Skip to content

Commit 1b4e9fd

Browse files
paulmckrcuurezki
authored andcommitted
rcu: Create NEED_TASKS_RCU to factor out enablement logic
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. This commit therefore creates a new NEED_TASKS_RCU Kconfig option so that the default value of TASKS_RCU can depend on a combination of this new option and any needed enablement logic, so that this logic is in one place. While in the area, also anticipate a likely future change by adding PREEMPT_AUTO to that logic. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Ankur Arora <ankur.a.arora@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
1 parent 65b4a59 commit 1b4e9fd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

kernel/rcu/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ config FORCE_TASKS_RCU
8585
idle, and user-mode execution as quiescent states. Not for
8686
manual selection in most cases.
8787

88-
config TASKS_RCU
88+
config NEED_TASKS_RCU
8989
bool
9090
default n
91+
92+
config TASKS_RCU
93+
bool
94+
default NEED_TASKS_RCU && (PREEMPTION || PREEMPT_AUTO)
9195
select IRQ_WORK
9296

9397
config FORCE_TASKS_RUDE_RCU

0 commit comments

Comments
 (0)