aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/srcu.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-28 13:53:04 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-06-08 08:25:38 -0700
commit07f6e64bf2ab98cad0d9c595659209858e7bff83 (patch)
tree96657582f82b2de9c2367754892713e06c445155 /include/linux/srcu.h
parentrcu: Add lockdep_assert_held() teeth to tree_plugin.h (diff)
downloadlinux-dev-07f6e64bf2ab98cad0d9c595659209858e7bff83.tar.xz
linux-dev-07f6e64bf2ab98cad0d9c595659209858e7bff83.zip
srcu: Make SRCU be once again optional
Commit d160a727c40e ("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 <paulmck@linux.vnet.ibm.com> Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r--include/linux/srcu.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 4c1d5f7e62c4..ea356d800675 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -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
/**