Skip to content

Commit

Permalink
srcu: Make SRCU be once again optional
Browse files Browse the repository at this point in the history
Commit d160a72 ("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: Paul E. McKenney <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
  • Loading branch information
paulmck committed Jun 8, 2017
1 parent ea9b0c8 commit 07f6e64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion include/linux/srcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
#else
#elif defined(CONFIG_SRCU)
#error "Unknown SRCU implementation specified to kernel configuration"
#else

/* Dummy definition for things like notifiers. Actual use gets link error. */
struct srcu_struct { };

#endif

/**
Expand Down
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ config RCU_EXPERT

config SRCU
bool
default y
help
This option selects the sleepable version of RCU. This version
permits arbitrary sleeping or blocking within RCU read-side critical
Expand Down

0 comments on commit 07f6e64

Please sign in to comment.