diff --git a/Makefile b/Makefile index 62608805..ed6f10bf 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,6 @@ endif # Changes done in Linux 6.6 onwards ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0) -# PCIE EPF driver probe has additional argument as ID -subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG - # Crypto driver has major change in it ops, skip it export CONFIG_SKIP_CRYPTO=y endif diff --git a/drivers/misc/nvscic2c-pcie/epf/module.c b/drivers/misc/nvscic2c-pcie/epf/module.c index 6645ce34..24613d64 100644 --- a/drivers/misc/nvscic2c-pcie/epf/module.c +++ b/drivers/misc/nvscic2c-pcie/epf/module.c @@ -741,7 +741,7 @@ static const struct pci_epc_event_ops nvscic2c_event_ops = { }; static int -#if defined(NV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG) +#if defined(NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG) /* Linux 6.4 */ nvscic2c_pcie_epf_probe(struct pci_epf *epf, const struct pci_epf_device_id *id) #else nvscic2c_pcie_epf_probe(struct pci_epf *epf) diff --git a/drivers/pci/endpoint/functions/pci-epf-dma-test.c b/drivers/pci/endpoint/functions/pci-epf-dma-test.c index 50a74777..2214e978 100644 --- a/drivers/pci/endpoint/functions/pci-epf-dma-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-dma-test.c @@ -272,7 +272,7 @@ static const struct pci_epc_event_ops pci_epf_dma_test_event_ops = { #endif }; -#if defined(NV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG) +#if defined(NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG) /* Linux 6.4 */ static int pcie_dma_epf_probe(struct pci_epf *epf, const struct pci_epf_device_id *id) #else static int pcie_dma_epf_probe(struct pci_epf *epf) diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 47433df3..7c25a63c 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -129,6 +129,7 @@ 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 += pci_epf_driver_struct_probe_has_id_arg 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 diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 1eafeb0e..985a5ba1 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -7067,6 +7067,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions" ;; + pci_epf_driver_struct_probe_has_id_arg) + # + # Determine if the struct pci_epf_driver probe API has ID argument or not. + # + # The additional argument as ID is added in probe() of the struct pci_epf_driver + # with change 081c715dfd5054 ("PCI: endpoint: Pass EPF device ID to the probe function") + # in Linux 6.4. + # + CODE=" + #include + void conftest_pci_epf_driver_struct_probe_has_id_arg(struct pci_epf_driver *epfd) { + epfd->probe(NULL); + }" + + compile_check_conftest "$CODE" "NV_PCI_EPF_DRIVER_STRUCT_PROBE_HAS_ID_ARG" "" "functions" + ;; + register_shrinker_has_fmt_arg) # # Determine if the 'register_shrinker' function