mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drivers: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.
Bug 4991705
Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -150,7 +150,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 += module_import_ns_calls_stringify
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += msi_get_virq
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
|
||||
|
||||
@@ -7633,18 +7633,22 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_MII_BUS_STRUCT_HAS_WRITE_C45" "" "types"
|
||||
;;
|
||||
|
||||
module_import_ns_macro)
|
||||
module_import_ns_calls_stringify)
|
||||
#
|
||||
# Determine if the MODULE_IMPORT_NS macro present.
|
||||
# Determine if the MODULE_IMPORT_NS macro takes a string literal as
|
||||
# an argument.
|
||||
#
|
||||
# Commit cdd30ebb1b9f ("module: Convert symbol namespace to string
|
||||
# literal") updated the symbol namespace macros to take a string
|
||||
# literal as an argument and removes the call to __stringify from
|
||||
# within the macro for Linux v6.13.
|
||||
#
|
||||
# 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"
|
||||
compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_CALLS_STRINGIFY" "" "types"
|
||||
;;
|
||||
|
||||
no_llseek)
|
||||
|
||||
Reference in New Issue
Block a user