Commit 07f6e64b authored by Paul E. McKenney's avatar Paul E. McKenney

srcu: Make SRCU be once again optional

Commit d160a727 ("srcu: Make SRCU be built by default") in response
to build errors, which were caused by code that included srcu.h
despite !SRCU.  However, srcutiny.o is almost 2K of code, which is not
insignificant for those attempting to run the Linux kernel on IoT devices.
This commit therefore makes SRCU be once again optional, and adjusts
srcu.h to allow error-free inclusion in !SRCU kernel builds.
Signed-off-by: default avatarPaul E. McKenney <>
Acked-by: default avatarNicolas Pitre <>
parent ea9b0c8a
......@@ -62,8 +62,13 @@ int init_srcu_struct(struct srcu_struct *sp);
#include <linux/srcutree.h>
#elif defined(CONFIG_CLASSIC_SRCU)
#include <linux/srcuclassic.h>
#elif defined(CONFIG_SRCU)
#error "Unknown SRCU implementation specified to kernel configuration"
/* Dummy definition for things like notifiers. Actual use gets link error. */
struct srcu_struct { };
......@@ -521,7 +521,6 @@ config RCU_EXPERT
config SRCU
default y
This option selects the sleepable version of RCU. This version
permits arbitrary sleeping or blocking within RCU read-side critical
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment