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_epc_event_ops struct has core_deinit
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.
Bug 4346767
Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
(cherry picked from commit 1e9fc00bc2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128430
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cbac517483
commit
83238f4563
@@ -142,6 +142,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_owner
|
||||
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 += pci_epf_driver_struct_probe_has_id_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_irq_type_enum_present
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
||||
|
||||
@@ -7351,6 +7351,23 @@ compile_test() {
|
||||
|
||||
compile_check_conftest "$CODE" "PCI_EPC_IRQ_TYPE_ENUM_PRESENT" "" "types"
|
||||
;;
|
||||
|
||||
pci_epc_event_ops_struct_has_core_deinit)
|
||||
#
|
||||
# Determine if the pci_epc_event_ops struct has the core_deinit function.
|
||||
#
|
||||
# Added by commit 3d99b5acdd3191c ("NVIDIA: SAUCE: PCI: endpoint: Add core_deinit()
|
||||
# callback support") from Nvidia PCI improvement.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/pci-epf.h>
|
||||
int conftest_pci_epc_event_ops_struct_has_core_deinit(void) {
|
||||
return offsetof(struct pci_epc_event_ops, core_deinit);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_CORE_DEINIT" "" "types"
|
||||
;;
|
||||
|
||||
register_shrinker_has_fmt_arg)
|
||||
#
|
||||
# Determine if the 'register_shrinker' function
|
||||
|
||||
Reference in New Issue
Block a user