pci: Use conftest to find if pci_enable_pcie_error_reporting() present

Use conftest to find if API pci_enable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 7ec4b34be42345 ("PCI/AER: Unexport
pci_enable_pcie_error_reporting()")

Bug 4346767

Change-Id: Ib0037544b4480b37c0ed6ac8b9ef9aef6ae82619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028742
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-05 18:07:41 +00:00
committed by mobile promotions
parent f9f8b37e74
commit bf46060d1e
6 changed files with 23 additions and 6 deletions

View File

@@ -128,6 +128,7 @@ 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 += pci_enable_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

View File

@@ -7050,6 +7050,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_PCI_DISABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions"
;;
pci_enable_pcie_error_reporting)
#
# Determine if the pci_enable_pcie_error_reporting() API available.
#
# API pci_enable_pcie_error_reporting() is dropped from Linux 6.5
# with commit 7ec4b34be42345 ("PCI/AER: Unexport
# pci_disable_pcie_error_reporting()")
#
CODE="
#include <linux/aer.h>
void conftest_pci_enable_pcie_error_reporting(void) {
pci_enable_pcie_error_reporting();
}"
compile_check_conftest "$CODE" "NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions"
;;
register_shrinker_has_fmt_arg)
#
# Determine if the 'register_shrinker' function