PCI: EPF: dma-test: Fix build for Linux v6.10

In Linux v6.10, the 'core_init_notifier' flag has been removed and
dw_pcie_ep_init_notify() is now called by the designware endpoint driver
so it is not necessary to call from the EPF DMA test driver. Add a test
to the conftest script to detect the presence of the
'core_init_notifier' flag and update the EPF DMA test driver as
necessary.

Bug 4593750

Change-Id: I1c3862df2c673fcb2d7c19ebbf5e7d1cbdefea1f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152309
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-06-06 11:39:08 +01:00
committed by mobile promotions
parent 27bc2f4757
commit d449f6cfd6
3 changed files with 21 additions and 2 deletions

View File

@@ -153,6 +153,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_owner
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_config
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_features_struct_has_bar
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_features_struct_has_core_init_notifier
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_write_header_has_vfn_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting

View File

@@ -7517,6 +7517,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_BAR" "" "types"
;;
pci_epc_features_struct_has_core_init_notifier)
#
# Determine if the pci_epc_features struct has a member 'core_init_notifier'.
#
# Commit a01e7214bef9 ("PCI: endpoint: Remove "core_init_notifier" flag")
# removed the flag 'core_init_notifier' from the pci_epc_features structure
# in Linux v6.10.
#
CODE="
#include <linux/pci-epc.h>
int conftest_pci_epc_features_struct_has_core_init_notifier(void) {
return offsetof(struct pci_epc_features, core_init_notifier);
}"
compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_CORE_INIT_NOTIFIER" "" "types"
;;
pci_epc_write_header_has_vfn_arg)
#
# Determine if the pci_epc_write_header() has the vfn argument or not.