rcu: don't use modular infrastructure in non-modular code
PATCH 1/1 rcu: don't use modular infrastructure in non-modular code
The Kconfig currently controlling compilation of tree.c is:
init/Kconfig:config TREE_RCU
init/Kconfig: bool
...and update.c and sync.c are "obj-y" meaning that none are ever built as a module by anyone.
Since MODULE_ALIAS is a no-op for non-modular code, we can remove them from these files.
We leave moduleparam.h behind since the files instantiate some boot time configuration parameters with module_param() still.
--- kernel/rcu/sync.c | 2 -- kernel/rcu/tree.c | 2 -- kernel/rcu/update.c | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-)
kernel/rcu/sync.c +0 -2
@@ -23,9 +23,7 @@#include <linux/rcu_sync.h> #include <linux/sched.h> #include <linux/moduleparam.h> -#include <linux/module.h> -MODULE_ALIAS ("rcusync" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif
kernel/rcu/tree.c +0 -2
@@ -41,7 +41,6 @@#include <linux/export.h> #include <linux/completion.h> #include <linux/moduleparam.h> -#include <linux/module.h> #include <linux/percpu.h> #include <linux/notifier.h> #include <linux/cpu.h>
@@ -60,7 +59,6 @@#include "tree.h" #include "rcu.h" -MODULE_ALIAS ("rcutree" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif
kernel/rcu/update.c +1 -2
@@ -46,7 +46,7 @@#include <linux/export.h> #include <linux/hardirq.h> #include <linux/delay.h> -#include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kthread.h> #include <linux/tick.h>
@@ -54,7 +54,6 @@#include "rcu.h" -MODULE_ALIAS ("rcupdate" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif
Signature · 1 line
2.8.4
Quoted 14 lines · Paul Gortmaker
The
Kconfigcurrently controlling compilation oftree.cis:init/Kconfig:config
TREE_RCU
init/Kconfig: bool...and
update.candsync.care "obj-y" meaning that none are ever built as a module by anyone.Since
MODULE_ALIASis a no-op for non-modular code, we can remove them from these files.We leave
moduleparam.hbehind since the files instantiate some boot time configuration parameters withmodule_param()still.
Quoted 6 lines
Cc "Paul E. McKenney" <[email protected]>Cc Josh Triplett <[email protected]>Cc Steven Rostedt <[email protected]>Cc Mathieu Desnoyers <[email protected]>Cc Lai Jiangshan <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Queued for testing and review, thank you! Initial tests show that the "#define MODULE_PARAM_PREFIX" does the job without the MODULE_ALIAS(), so that part is good. ;-)
Thanx, Paul
Quoted 64 lines
--- kernel/rcu/sync.c | 2 -- kernel/rcu/tree.c | 2 -- kernel/rcu/update.c | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-)kernel/rcu/sync.c +0
-2@@ -23,9 +23,7 @@#include <linux/rcu_sync.h> #include <linux/sched.h> #include <linux/moduleparam.h> -#include <linux/module.h> -MODULE_ALIAS ("rcusync" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif kernel/rcu/tree.c +0
-2@@ -41,7 +41,6 @@#include <linux/export.h> #include <linux/completion.h> #include <linux/moduleparam.h> -#include <linux/module.h> #include <linux/percpu.h> #include <linux/notifier.h> #include <linux/cpu.h> @@ -60,7 +59,6 @@#include "tree.h" #include "rcu.h" -MODULE_ALIAS ("rcutree" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif kernel/rcu/update.c +1
-2@@ -46,7 +46,7 @@#include <linux/export.h> #include <linux/hardirq.h> #include <linux/delay.h> -#include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kthread.h> #include <linux/tick.h> @@ -54,7 +54,6 @@#include "rcu.h" -MODULE_ALIAS ("rcupdate" );#ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX#endif Signature · 1 line
2.8.4