aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupreempt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcupreempt.h')
-rw-r--r--include/linux/rcupreempt.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index 0967f03b0705..3e05c09b54a2 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -57,7 +57,13 @@ static inline void rcu_qsctr_inc(int cpu)
57 rdssp->sched_qs++; 57 rdssp->sched_qs++;
58} 58}
59#define rcu_bh_qsctr_inc(cpu) 59#define rcu_bh_qsctr_inc(cpu)
60#define call_rcu_bh(head, rcu) call_rcu(head, rcu) 60
61/*
62 * Someone might want to pass call_rcu_bh as a function pointer.
63 * So this needs to just be a rename and not a macro function.
64 * (no parentheses)
65 */
66#define call_rcu_bh call_rcu
61 67
62/** 68/**
63 * call_rcu_sched - Queue RCU callback for invocation after sched grace period. 69 * call_rcu_sched - Queue RCU callback for invocation after sched grace period.
@@ -111,7 +117,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);
111struct softirq_action; 117struct softirq_action;
112 118
113#ifdef CONFIG_NO_HZ 119#ifdef CONFIG_NO_HZ
114DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);
115 120
116static inline void rcu_enter_nohz(void) 121static inline void rcu_enter_nohz(void)
117{ 122{
@@ -126,8 +131,8 @@ static inline void rcu_exit_nohz(void)
126{ 131{
127 static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1); 132 static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
128 133
129 smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
130 __get_cpu_var(rcu_dyntick_sched).dynticks++; 134 __get_cpu_var(rcu_dyntick_sched).dynticks++;
135 smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
131 WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1), 136 WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1),
132 &rs); 137 &rs);
133} 138}