From 1707f60f8b2dcca748889c879084af1b2fce240e Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 2 Jul 2024 07:36:03 +0000 Subject: [PATCH] conftest: Add macro to determine if MODULE_IMPORT_NS present Add conftest to determine if the MODULE_IMPORT_NS macro present. This macro is added in commit 80140a81f7f833 ("module.h: simplify MODULE_IMPORT_NS") in Linux 5.18. Jira HOSTX-5375 Change-Id: Ie61dd169d21a0169c44060eb0e3f3fe4a9c149e8 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166547 --- scripts/conftest/Makefile | 1 + scripts/conftest/conftest.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 3dabb976..b0edf267 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -135,6 +135,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_read_c45 NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_write_c45 NV_CONFTEST_FUNCTION_COMPILE_TESTS += media_entity_remote_pad +NV_CONFTEST_FUNCTION_COMPILE_TESTS += module_import_ns_macro NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_get_named_gpio_flags diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 950e7300..466807bd 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -7342,6 +7342,20 @@ compile_test() { compile_check_conftest "$CODE" "NV_MII_BUS_STRUCT_HAS_WRITE_C45" "" "types" ;; + module_import_ns_macro) + # + # Determine if the MODULE_IMPORT_NS macro present. + # + # Added in commit 80140a81f7f833 ("module.h: simplify MODULE_IMPORT_NS") + # in Linux 5.18. + CODE=" + #include + MODULE_IMPORT_NS(DMA_BUF); + " + + compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_PRESENT" "" "types" + ;; + platform_msi_domain_alloc_irqs) # # Determine if the platform_msi_domain_alloc_irqs() API available or not.