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_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:
committed by
mobile promotions
parent
f9f8b37e74
commit
bf46060d1e
3
Makefile
3
Makefile
@@ -49,9 +49,6 @@ subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
||||
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
||||
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
|
||||
|
||||
# PCIE EPF driver probe has additional argument as ID
|
||||
subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ nvscic2c_pcie_epc_probe(struct pci_dev *pdev,
|
||||
ret = pcim_enable_device(pdev);
|
||||
if (ret)
|
||||
goto err_enable_device;
|
||||
#if !defined(NV_DROP_PCIE_ERROR_REPORTING)
|
||||
#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */
|
||||
pci_enable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
pci_set_master(pdev);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/aer.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/crc32.h>
|
||||
@@ -170,7 +172,7 @@ static int ep_test_dma_probe(struct pci_dev *pdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(NV_DROP_PCIE_ERROR_REPORTING)
|
||||
#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */
|
||||
pci_enable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -749,7 +749,7 @@ static int tvnet_host_probe(struct pci_dev *pdev,
|
||||
goto free_netdev;
|
||||
}
|
||||
|
||||
#if !defined(NV_DROP_PCIE_ERROR_REPORTING)
|
||||
#if defined(NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT) /* Linux 6.5 */
|
||||
pci_enable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user