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 <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166547
This commit is contained in:
Laxman Dewangan
2024-07-02 07:36:03 +00:00
committed by mobile promotions
parent d5ff462449
commit 1707f60f8b
2 changed files with 15 additions and 0 deletions

View File

@@ -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

View File

@@ -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 <linux/module.h>
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.