diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 2b8d9a11..cf6dd203 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -144,6 +144,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_chip_struct_has_base_arg 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_disable_pcie_error_reporting NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_alloc_space_has_epc_features_arg diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 39de6acb..58966d39 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -7352,6 +7352,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_PCI_EPC_EVENT_OPS_STRUCT_HAS_CORE_DEINIT" "" "types" ;; + pci_epc_features_struct_has_bar) + # + # Determine if the pci_epc_features struct has a member 'bar'. + # + # Commit e01c9797c0eb ("PCI: endpoint: Clean up hardware description for BARs") + # added 'struct pci_epc_bar_desc bar' to the pci_epc_features structure in + # Linux v6.9. + # + CODE=" + #include + int conftest_pci_epc_features_struct_has_pci_epc_bar_desc(void) { + return offsetof(struct pci_epc_features, bar); + }" + + compile_check_conftest "$CODE" "NV_PCI_EPC_FEATURES_STRUCT_HAS_BAR" "" "types" + ;; + pci_disable_pcie_error_reporting) # # Determine if the pci_disable_pcie_error_reporting() API available or not.