Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444430 > unrolled thread

[PATCH] rcu: don't use modular infrastructure in non-modular code

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2016-07-15 18:30 +0200
Last post2016-07-15 20:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rcu: don't use modular infrastructure in non-modular code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-15 18:30 +0200
    Re: [PATCH] rcu: don't use modular infrastructure in non-modular code "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-07-15 20:20 +0200

#1444430 — [PATCH] rcu: don't use modular infrastructure in non-modular code

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-07-15 18:30 +0200
Subject[PATCH] rcu: don't use modular infrastructure in non-modular code
Message-ID<rVe9Y-GD-51@gated-at.bofh.it>
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.

Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 kernel/rcu/sync.c   | 2 --
 kernel/rcu/tree.c   | 2 --
 kernel/rcu/update.c | 3 +--
 3 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c
index a33dfc9b3b0c..2c2a0721e6fa 100644
--- a/kernel/rcu/sync.c
+++ b/kernel/rcu/sync.c
@@ -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
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index bcae3cea40fd..4bc03955a393 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -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
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index f0d8322bc3ec..f19271dce0a9 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -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
-- 
2.8.4

[toc] | [next] | [standalone]


#1444495

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-07-15 20:20 +0200
Message-ID<rVfSp-1LH-3@gated-at.bofh.it>
In reply to#1444430
On Fri, Jul 15, 2016 at 12:19:41PM -0400, Paul Gortmaker wrote:
> 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.
> 
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Lai Jiangshan <jiangshanlai@gmail.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

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

> ---
>  kernel/rcu/sync.c   | 2 --
>  kernel/rcu/tree.c   | 2 --
>  kernel/rcu/update.c | 3 +--
>  3 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c
> index a33dfc9b3b0c..2c2a0721e6fa 100644
> --- a/kernel/rcu/sync.c
> +++ b/kernel/rcu/sync.c
> @@ -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
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index bcae3cea40fd..4bc03955a393 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -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
> diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
> index f0d8322bc3ec..f19271dce0a9 100644
> --- a/kernel/rcu/update.c
> +++ b/kernel/rcu/update.c
> @@ -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
> -- 
> 2.8.4
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web