aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-05-03 14:06:05 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-06-08 21:52:30 -0400
commit791875d16e2f6e2e5b90328ccac643f512ac76c4 (patch)
treebe48a4e902826b9760c913641528a56d74281a9c /kernel/rcu/tree.c
parentd0df7a349133e10184d478ae1189e79e5c53615d (diff)
rcu: Eliminate the unused __rcu_is_watching() function
The __rcu_is_watching() function is currently not used, aside from to implement the rcu_is_watching() function. This commit therefore eliminates __rcu_is_watching(), which has the beneficial side-effect of shrinking include/linux/rcupdate.h a bit. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 5ebc830297c1..61a97164abcc 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1139,22 +1139,11 @@ void rcu_nmi_exit(void)
1139} 1139}
1140 1140
1141/** 1141/**
1142 * __rcu_is_watching - are RCU read-side critical sections safe?
1143 *
1144 * Return true if RCU is watching the running CPU, which means that
1145 * this CPU can safely enter RCU read-side critical sections. Unlike
1146 * rcu_is_watching(), the caller of __rcu_is_watching() must have at
1147 * least disabled preemption.
1148 */
1149bool notrace __rcu_is_watching(void)
1150{
1151 return !rcu_dynticks_curr_cpu_in_eqs();
1152}
1153
1154/**
1155 * rcu_is_watching - see if RCU thinks that the current CPU is idle 1142 * rcu_is_watching - see if RCU thinks that the current CPU is idle
1156 * 1143 *
1157 * If the current CPU is in its idle loop and is neither in an interrupt 1144 * Return true if RCU is watching the running CPU, which means that this
1145 * CPU can safely enter RCU read-side critical sections. In other words,
1146 * if the current CPU is in its idle loop and is neither in an interrupt
1158 * or NMI handler, return true. 1147 * or NMI handler, return true.
1159 */ 1148 */
1160bool notrace rcu_is_watching(void) 1149bool notrace rcu_is_watching(void)
@@ -1162,7 +1151,7 @@ bool notrace rcu_is_watching(void)
1162 bool ret; 1151 bool ret;
1163 1152
1164 preempt_disable_notrace(); 1153 preempt_disable_notrace();
1165 ret = __rcu_is_watching(); 1154 ret = !rcu_dynticks_curr_cpu_in_eqs();
1166 preempt_enable_notrace(); 1155 preempt_enable_notrace();
1167 return ret; 1156 return ret;
1168} 1157}