mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +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
(cherry picked from commit bf46060d1e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032090
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ab8b8a6c84
commit
4a1a87890d
3
Makefile
3
Makefile
@@ -47,9 +47,6 @@ subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
|||||||
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
||||||
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
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
|
# PCIE EPF driver probe has additional argument as ID
|
||||||
subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG
|
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);
|
ret = pcim_enable_device(pdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_enable_device;
|
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);
|
pci_enable_pcie_error_reporting(pdev);
|
||||||
#endif
|
#endif
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
* Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved.
|
* Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/aer.h>
|
#include <linux/aer.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/crc32.h>
|
#include <linux/crc32.h>
|
||||||
@@ -170,7 +172,7 @@ static int ep_test_dma_probe(struct pci_dev *pdev,
|
|||||||
return ret;
|
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);
|
pci_enable_pcie_error_reporting(pdev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -749,7 +749,7 @@ static int tvnet_host_probe(struct pci_dev *pdev,
|
|||||||
goto free_netdev;
|
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);
|
pci_enable_pcie_error_reporting(pdev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
|||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
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 += register_shrinker_has_fmt_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming
|
||||||
|
|||||||
@@ -6985,6 +6985,23 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_PCI_DISABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions"
|
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)
|
register_shrinker_has_fmt_arg)
|
||||||
#
|
#
|
||||||
# Determine if the 'register_shrinker' function
|
# Determine if the 'register_shrinker' function
|
||||||
|
|||||||
Reference in New Issue
Block a user