preempt-rcu: untangle kconfig RT_FULL/PREEMPT_RCU relationship
The intent of the rcu-force-preempt-rcu-for-rt.patch was to
ensure you weren't even asked about PREEMPT_RCU when RT_FULL
was =y. However it tried to achieve this with a dependency,
and that just masks the option completely. This wasn't noticed
since the patch was accidentally reverted, and misplaced (see
prev two commits) and hence the misuse of a dependency causing
the exact opposite of the desired effect went un-noticed.
By using a select PREEMPT_RCU in the RT_FULL block, we get
the desired effect, i.e. Kconfig will not ask the user whether
they want PREEMPT_RCU. It will simply set it unconditionally
for anyone with RT_FULL=y
Since RT_FULL Kconfig control block doesn't even appear until
the kconfig-preempt-rt-full.patch - we insert the select line
into that patch.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/kconfig-preempt-rt-full.patch b/kconfig-preempt-rt-full.patch
index ca7261d..92fc433 100644
--- a/kconfig-preempt-rt-full.patch
+++ b/kconfig-preempt-rt-full.patch
@@ -23,7 +23,7 @@
===================================================================
--- linux-stable.orig/kernel/Kconfig.preempt
+++ linux-stable/kernel/Kconfig.preempt
-@@ -73,6 +73,13 @@ config PREEMPT_RTB
+@@ -73,6 +73,14 @@ config PREEMPT_RTB
enables changes which are preliminary for the full preemptiple
RT kernel.
@@ -31,6 +31,7 @@
+ bool "Fully Preemptible Kernel (RT)"
+ depends on IRQ_FORCED_THREADING
+ select PREEMPT_RT_BASE
++ select PREEMPT_RCU
+ help
+ All and everything
+
diff --git a/rcu-force-preempt-rcu-for-rt.patch b/rcu-force-preempt-rcu-for-rt.patch
deleted file mode 100644
index 38eeb2a..0000000
--- a/rcu-force-preempt-rcu-for-rt.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a014d7b0c472bf933ca7e570c2c1cd7c5ccdb92b Mon Sep 17 00:00:00 2001
-From: Ingo Molnar <mingo@elte.hu>
-Date: Fri, 3 Jul 2009 08:30:30 -0500
-Subject: [PATCH] RCU: Force PREEMPT_RCU for PREEMPT-RT
-
-PREEMPT_RT relies on PREEMPT_RCU - only allow RCU to be configured
-interactively in the !PREEMPT_RT case.
-
-Signed-off-by: Ingo Molnar <mingo@elte.hu>
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
----
- init/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/init/Kconfig b/init/Kconfig
-index badd56f..dc99d20 100644
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -437,6 +437,7 @@ endchoice
-
- config PREEMPT_RCU
- def_bool ( TREE_PREEMPT_RCU || TINY_PREEMPT_RCU )
-+ depends on !PREEMPT_RT_FULL
- help
- This option enables preemptible-RCU code that is common between
- the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
---
-1.8.1.2
-
diff --git a/series b/series
index 24902ef..67af1d8 100644
--- a/series
+++ b/series
@@ -435,7 +435,6 @@
timer.c-fix-build-fail-for-RT_FULL.patch
# RCU
-rcu-force-preempt-rcu-for-rt.patch
peter_zijlstra-frob-rcu.patch
rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch
rcu-tiny-merge-bh.patch