summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-07-03 10:44:44 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-08-30 16:02:46 -0700
commit709fdce7545c978e69f52eb19082ea3af44332f5 (patch)
treedf4908d9dda5d84d574c1935fd32f3a4f0e3fe00 /include/linux
parent45975c7d21a1c0aba97e3d8007e2a7c123145748 (diff)
rcu: Express Tiny RCU updates in terms of RCU rather than RCU-sched
This commit renames Tiny RCU functions so that the lowest level of functionality is RCU (e.g., synchronize_rcu()) rather than RCU-sched (e.g., synchronize_sched()). This provides greater naming compatibility with Tree RCU, which will in turn permit more LoC removal once the RCU-sched and RCU-bh update-side API is removed. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> [ paulmck: Fix Tiny call_rcu()'s EXPORT_SYMBOL() in response to a bug report from kbuild test robot. ]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rcupdate.h12
-rw-r--r--include/linux/rcutiny.h34
-rw-r--r--include/linux/rcutree.h1
3 files changed, 24 insertions, 23 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 94474bb6b5c4..1207c6c9bd8b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -49,15 +49,14 @@
/* Exported common interfaces */
-#ifdef CONFIG_TINY_RCU
-#define call_rcu call_rcu_sched
-#else
-void call_rcu(struct rcu_head *head, rcu_callback_t func);
+#ifndef CONFIG_TINY_RCU
+void synchronize_sched(void);
+void call_rcu_sched(struct rcu_head *head, rcu_callback_t func);
#endif
-void call_rcu_sched(struct rcu_head *head, rcu_callback_t func);
-void synchronize_sched(void);
+void call_rcu(struct rcu_head *head, rcu_callback_t func);
void rcu_barrier_tasks(void);
+void synchronize_rcu(void);
static inline void call_rcu_bh(struct rcu_head *head, rcu_callback_t func)
{
@@ -68,7 +67,6 @@ static inline void call_rcu_bh(struct rcu_head *head, rcu_callback_t func)
void __rcu_read_lock(void);
void __rcu_read_unlock(void);
-void synchronize_rcu(void);
/*
* Defined as a macro as it is a very low level header included from
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index df2c0895c5e7..e66fb8bc2127 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -36,9 +36,9 @@ static inline int rcu_dynticks_snap(struct rcu_dynticks *rdtp)
/* Never flag non-existent other CPUs! */
static inline bool rcu_eqs_special_set(int cpu) { return false; }
-static inline void synchronize_rcu(void)
+static inline void synchronize_sched(void)
{
- synchronize_sched();
+ synchronize_rcu();
}
static inline unsigned long get_state_synchronize_rcu(void)
@@ -61,16 +61,11 @@ static inline void cond_synchronize_sched(unsigned long oldstate)
might_sleep();
}
-static inline void synchronize_rcu_expedited(void)
-{
- synchronize_sched(); /* Only one CPU, so pretty fast anyway!!! */
-}
+extern void rcu_barrier(void);
-extern void rcu_barrier_sched(void);
-
-static inline void rcu_barrier(void)
+static inline void rcu_barrier_sched(void)
{
- rcu_barrier_sched(); /* Only one CPU, so only one list of callbacks! */
+ rcu_barrier(); /* Only one CPU, so only one list of callbacks! */
}
static inline void rcu_barrier_bh(void)
@@ -88,27 +83,36 @@ static inline void synchronize_rcu_bh_expedited(void)
synchronize_sched();
}
+static inline void synchronize_rcu_expedited(void)
+{
+ synchronize_sched();
+}
+
static inline void synchronize_sched_expedited(void)
{
synchronize_sched();
}
-static inline void kfree_call_rcu(struct rcu_head *head,
- rcu_callback_t func)
+static inline void call_rcu_sched(struct rcu_head *head, rcu_callback_t func)
+{
+ call_rcu(head, func);
+}
+
+static inline void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func)
{
call_rcu(head, func);
}
-void rcu_sched_qs(void);
+void rcu_qs(void);
static inline void rcu_softirq_qs(void)
{
- rcu_sched_qs();
+ rcu_qs();
}
#define rcu_note_context_switch(preempt) \
do { \
- rcu_sched_qs(); \
+ rcu_qs(); \
rcu_tasks_qs(current); \
} while (0)
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 0c44720f0e84..6d30a0809300 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -45,7 +45,6 @@ static inline void rcu_virt_note_context_switch(int cpu)
rcu_note_context_switch(false);
}
-void synchronize_rcu(void);
static inline void synchronize_rcu_bh(void)
{
synchronize_rcu();