mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
pci: Use conftest to find if pci_disable_pcie_error_reporting() present
Use conftest to find if API pci_disable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 69b264df8a41282 ("PCI/AER: Drop unused
pci_disable_pcie_error_reporting()")
Bug 4346767
Change-Id: Idcaf36e4215a874c70f7457a46fd875f1349b121
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028741
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1e9fc00bc2
commit
f9f8b37e74
3
Makefile
3
Makefile
@@ -52,9 +52,6 @@ subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
||||
# Deprecate PCIED Error reporting pci_enable_pcie_error_reporting
|
||||
subdir-ccflags-y += -DNV_DROP_PCIE_ERROR_REPORTING
|
||||
|
||||
# Drop the API for pcie_disable_pcie_error_reporting
|
||||
subdir-ccflags-y += -DNV_PCIE_DIABLE_PCIE_ERROR_REPORTING_DROP
|
||||
|
||||
# PCIE EPF driver probe has additional argument as ID
|
||||
subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#define pr_fmt(fmt) "nvscic2c-pcie: epc: " fmt
|
||||
|
||||
#include <linux/aer.h>
|
||||
@@ -290,7 +292,7 @@ deinit:
|
||||
|
||||
pci_release_region(pdev, 0);
|
||||
pci_clear_master(pdev);
|
||||
#if !defined(NV_PCIE_DIABLE_PCIE_ERROR_REPORTING_DROP)
|
||||
#if defined(NV_PCI_DISABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
pci_disable_device(pdev);
|
||||
|
||||
@@ -127,6 +127,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_owner
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
||||
|
||||
@@ -7033,6 +7033,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_CORE_DEINIT" "" "types"
|
||||
;;
|
||||
|
||||
pci_disable_pcie_error_reporting)
|
||||
#
|
||||
# Determine if the pci_disable_pcie_error_reporting() API available or not.
|
||||
#
|
||||
# API pci_disable_pcie_error_reporting() is dropped from Linux 6.5
|
||||
# with commit 69b264df8a4128 ("PCI/AER: Drop unused
|
||||
# pci_disable_pcie_error_reporting()")
|
||||
#
|
||||
CODE="
|
||||
#include <linux/aer.h>
|
||||
void conftest_pci_disable_pcie_error_reporting(void) {
|
||||
pci_disable_pcie_error_reporting();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_PCI_DISABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
register_shrinker_has_fmt_arg)
|
||||
#
|
||||
# Determine if the 'register_shrinker' function
|
||||
|
||||
Reference in New Issue
Block a user