aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/srcu.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-11-22 13:53:57 -0800
committerPaul E. McKenney <paulmck@kernel.org>2022-11-29 15:00:06 -0800
commit0cd7e350abc40eed5d3b60292dc102f700c88388 (patch)
treef5777dc4fe1aed4fbbd1a38ba56b36d5af17dcfb /include/linux/srcu.h
parentrcu: Implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC (diff)
downloadwireguard-linux-0cd7e350abc40eed5d3b60292dc102f700c88388.tar.xz
wireguard-linux-0cd7e350abc40eed5d3b60292dc102f700c88388.zip
rcu: Make SRCU mandatory
Kernels configured with CONFIG_PRINTK=n and CONFIG_SRCU=n get build failures. This causes trouble for deep embedded systems. But given that there are more than 25 instances of "select SRCU" in the kernel, it is hard to believe that there are many kernels running in production without SRCU. This commit therefore makes SRCU mandatory. The SRCU Kconfig option remains for backwards compatibility, and will be removed when it is no longer used. [ paulmck: Update per kernel test robot feedback. ] Reported-by: John Ogness <john.ogness@linutronix.de> Reported-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: <linux-arch@vger.kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Reviewed-by: John Ogness <john.ogness@linutronix.de>
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r--include/linux/srcu.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index f0814ffca34b..9b9d0bbf1d3c 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -47,11 +47,8 @@ int init_srcu_struct(struct srcu_struct *ssp);
#include <linux/srcutiny.h>
#elif defined(CONFIG_TREE_SRCU)
#include <linux/srcutree.h>
-#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 { };
+#error "Unknown SRCU implementation specified to kernel configuration"
#endif
void call_srcu(struct srcu_struct *ssp, struct rcu_head *head,
@@ -78,11 +75,7 @@ static inline void __srcu_read_unlock_nmisafe(struct srcu_struct *ssp, int idx)
}
#endif /* CONFIG_NEED_SRCU_NMI_SAFE */
-#ifdef CONFIG_SRCU
void srcu_init(void);
-#else /* #ifdef CONFIG_SRCU */
-static inline void srcu_init(void) { }
-#endif /* #else #ifdef CONFIG_SRCU */
#ifdef CONFIG_DEBUG_LOCK_ALLOC