diff mbox series

[3/4] arch: Select new NEED_TASKS_RCU Kconfig option

Message ID 20240223002627.1987886-3-paulmck@kernel.org (mailing list archive)
State Accepted
Commit ebcd58305a69aba0b108eda20480a0f7625a5313
Headers show
Series Refactor TASKS_RCU for lazy preemption | expand

Commit Message

Paul E. McKenney Feb. 23, 2024, 12:26 a.m. UTC
Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does
"select TASKS_RCU if PREEMPTION".  This works, but requires any change in
this enablement logic to be replicated across all such "select" clauses.
A new NEED_TASKS_RCU Kconfig option has been created to allow this
enablement logic to be in one place in kernel/rcu/Kconfig.

Therefore, select the new NEED_TASKS_RCU Kconfig option instead of the
old TASKS_RCU option.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Ankur Arora <ankur.a.arora@oracle.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 arch/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Steven Rostedt Feb. 23, 2024, 1:36 a.m. UTC | #1
On Thu, 22 Feb 2024 16:26:26 -0800
"Paul E. McKenney" <paulmck@kernel.org> wrote:

> Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does
> "select TASKS_RCU if PREEMPTION".  This works, but requires any change in
> this enablement logic to be replicated across all such "select" clauses.
> A new NEED_TASKS_RCU Kconfig option has been created to allow this
> enablement logic to be in one place in kernel/rcu/Kconfig.
> 
> Therefore, select the new NEED_TASKS_RCU Kconfig option instead of the
> old TASKS_RCU option.
> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Douglas Anderson <dianders@chromium.org>
> Cc: Ankur Arora <ankur.a.arora@oracle.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>

Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

> ---
>  arch/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/Kconfig b/arch/Kconfig
> index c91917b508736..154f994547632 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -55,7 +55,7 @@ config KPROBES
>  	depends on MODULES
>  	depends on HAVE_KPROBES
>  	select KALLSYMS
> -	select TASKS_RCU if PREEMPTION
> +	select NEED_TASKS_RCU
>  	help
>  	  Kprobes allows you to trap at almost any kernel address and
>  	  execute a callback function.  register_kprobe() establishes
> @@ -104,7 +104,7 @@ config STATIC_CALL_SELFTEST
>  config OPTPROBES
>  	def_bool y
>  	depends on KPROBES && HAVE_OPTPROBES
> -	select TASKS_RCU if PREEMPTION
> +	select NEED_TASKS_RCU
>  
>  config KPROBES_ON_FTRACE
>  	def_bool y
Paul E. McKenney Feb. 23, 2024, 4:57 a.m. UTC | #2
On Thu, Feb 22, 2024 at 08:36:51PM -0500, Steven Rostedt wrote:
> On Thu, 22 Feb 2024 16:26:26 -0800
> "Paul E. McKenney" <paulmck@kernel.org> wrote:
> 
> > Currently, if a Kconfig option depends on TASKS_RCU, it conditionally does
> > "select TASKS_RCU if PREEMPTION".  This works, but requires any change in
> > this enablement logic to be replicated across all such "select" clauses.
> > A new NEED_TASKS_RCU Kconfig option has been created to allow this
> > enablement logic to be in one place in kernel/rcu/Kconfig.
> > 
> > Therefore, select the new NEED_TASKS_RCU Kconfig option instead of the
> > old TASKS_RCU option.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Heiko Carstens <hca@linux.ibm.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Douglas Anderson <dianders@chromium.org>
> > Cc: Ankur Arora <ankur.a.arora@oracle.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> 
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

Thank you!  I will apply on my next rebase.

							Thanx, Paul

> -- Steve
> 
> > ---
> >  arch/Kconfig | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index c91917b508736..154f994547632 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -55,7 +55,7 @@ config KPROBES
> >  	depends on MODULES
> >  	depends on HAVE_KPROBES
> >  	select KALLSYMS
> > -	select TASKS_RCU if PREEMPTION
> > +	select NEED_TASKS_RCU
> >  	help
> >  	  Kprobes allows you to trap at almost any kernel address and
> >  	  execute a callback function.  register_kprobe() establishes
> > @@ -104,7 +104,7 @@ config STATIC_CALL_SELFTEST
> >  config OPTPROBES
> >  	def_bool y
> >  	depends on KPROBES && HAVE_OPTPROBES
> > -	select TASKS_RCU if PREEMPTION
> > +	select NEED_TASKS_RCU
> >  
> >  config KPROBES_ON_FTRACE
> >  	def_bool y
>
diff mbox series

Patch

diff --git a/arch/Kconfig b/arch/Kconfig
index c91917b508736..154f994547632 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -55,7 +55,7 @@  config KPROBES
 	depends on MODULES
 	depends on HAVE_KPROBES
 	select KALLSYMS
-	select TASKS_RCU if PREEMPTION
+	select NEED_TASKS_RCU
 	help
 	  Kprobes allows you to trap at almost any kernel address and
 	  execute a callback function.  register_kprobe() establishes
@@ -104,7 +104,7 @@  config STATIC_CALL_SELFTEST
 config OPTPROBES
 	def_bool y
 	depends on KPROBES && HAVE_OPTPROBES
-	select TASKS_RCU if PREEMPTION
+	select NEED_TASKS_RCU
 
 config KPROBES_ON_FTRACE
 	def_bool y