diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2023-09-08 23:36:00 +0300 |
---|---|---|
committer | Frederic Weisbecker <frederic@kernel.org> | 2023-10-04 23:25:28 +0300 |
commit | 2cb1f6e9a743af58a23cf14563b5eada1e0d3fde (patch) | |
tree | 60bbf767d24c0c5d23e1d4c7bc599e173db444b6 /include/linux/rcutree.h | |
parent | c964c1f5ee96e1460606d44f80a47bdacd8fe568 (diff) | |
download | linux-2cb1f6e9a743af58a23cf14563b5eada1e0d3fde.tar.xz |
rcu: Conditionally build CPU-hotplug teardown callbacks
Among the three CPU-hotplug teardown RCU callbacks, two of them early
exit if CONFIG_HOTPLUG_CPU=n, and one is left unchanged. In any case
all of them have an implementation when CONFIG_HOTPLUG_CPU=n.
Align instead with the common way to deal with CPU-hotplug teardown
callbacks and provide a proper stub when they are not supported.
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r-- | include/linux/rcutree.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 153cfc7bbffd..46875c4e9f56 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -110,9 +110,16 @@ void rcu_all_qs(void); /* RCUtree hotplug events */ int rcutree_prepare_cpu(unsigned int cpu); int rcutree_online_cpu(unsigned int cpu); -int rcutree_offline_cpu(unsigned int cpu); +void rcu_cpu_starting(unsigned int cpu); + +#ifdef CONFIG_HOTPLUG_CPU int rcutree_dead_cpu(unsigned int cpu); int rcutree_dying_cpu(unsigned int cpu); -void rcu_cpu_starting(unsigned int cpu); +int rcutree_offline_cpu(unsigned int cpu); +#else +#define rcutree_dead_cpu NULL +#define rcutree_dying_cpu NULL +#define rcutree_offline_cpu NULL +#endif #endif /* __LINUX_RCUTREE_H */ |