diff options
Diffstat (limited to 'kernel/rcu/tiny.c')
-rw-r--r-- | kernel/rcu/tiny.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index d9efcc13008c..c0623fc47125 100644 --- a/kernel/rcu/tiny.c +++ b/kernel/rcu/tiny.c | |||
@@ -51,7 +51,7 @@ static long long rcu_dynticks_nesting = DYNTICK_TASK_EXIT_IDLE; | |||
51 | 51 | ||
52 | #include "tiny_plugin.h" | 52 | #include "tiny_plugin.h" |
53 | 53 | ||
54 | /* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcutree.c. */ | 54 | /* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcu/tree.c. */ |
55 | static void rcu_idle_enter_common(long long newval) | 55 | static void rcu_idle_enter_common(long long newval) |
56 | { | 56 | { |
57 | if (newval) { | 57 | if (newval) { |
@@ -62,7 +62,7 @@ static void rcu_idle_enter_common(long long newval) | |||
62 | } | 62 | } |
63 | RCU_TRACE(trace_rcu_dyntick(TPS("Start"), | 63 | RCU_TRACE(trace_rcu_dyntick(TPS("Start"), |
64 | rcu_dynticks_nesting, newval)); | 64 | rcu_dynticks_nesting, newval)); |
65 | if (!is_idle_task(current)) { | 65 | if (IS_ENABLED(CONFIG_RCU_TRACE) && !is_idle_task(current)) { |
66 | struct task_struct *idle __maybe_unused = idle_task(smp_processor_id()); | 66 | struct task_struct *idle __maybe_unused = idle_task(smp_processor_id()); |
67 | 67 | ||
68 | RCU_TRACE(trace_rcu_dyntick(TPS("Entry error: not idle task"), | 68 | RCU_TRACE(trace_rcu_dyntick(TPS("Entry error: not idle task"), |
@@ -72,7 +72,7 @@ static void rcu_idle_enter_common(long long newval) | |||
72 | current->pid, current->comm, | 72 | current->pid, current->comm, |
73 | idle->pid, idle->comm); /* must be idle task! */ | 73 | idle->pid, idle->comm); /* must be idle task! */ |
74 | } | 74 | } |
75 | rcu_sched_qs(0); /* implies rcu_bh_qsctr_inc(0) */ | 75 | rcu_sched_qs(); /* implies rcu_bh_inc() */ |
76 | barrier(); | 76 | barrier(); |
77 | rcu_dynticks_nesting = newval; | 77 | rcu_dynticks_nesting = newval; |
78 | } | 78 | } |
@@ -114,7 +114,7 @@ void rcu_irq_exit(void) | |||
114 | } | 114 | } |
115 | EXPORT_SYMBOL_GPL(rcu_irq_exit); | 115 | EXPORT_SYMBOL_GPL(rcu_irq_exit); |
116 | 116 | ||
117 | /* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcutree.c. */ | 117 | /* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcu/tree.c. */ |
118 | static void rcu_idle_exit_common(long long oldval) | 118 | static void rcu_idle_exit_common(long long oldval) |
119 | { | 119 | { |
120 | if (oldval) { | 120 | if (oldval) { |
@@ -123,7 +123,7 @@ static void rcu_idle_exit_common(long long oldval) | |||
123 | return; | 123 | return; |
124 | } | 124 | } |
125 | RCU_TRACE(trace_rcu_dyntick(TPS("End"), oldval, rcu_dynticks_nesting)); | 125 | RCU_TRACE(trace_rcu_dyntick(TPS("End"), oldval, rcu_dynticks_nesting)); |
126 | if (!is_idle_task(current)) { | 126 | if (IS_ENABLED(CONFIG_RCU_TRACE) && !is_idle_task(current)) { |
127 | struct task_struct *idle __maybe_unused = idle_task(smp_processor_id()); | 127 | struct task_struct *idle __maybe_unused = idle_task(smp_processor_id()); |
128 | 128 | ||
129 | RCU_TRACE(trace_rcu_dyntick(TPS("Exit error: not idle task"), | 129 | RCU_TRACE(trace_rcu_dyntick(TPS("Exit error: not idle task"), |
@@ -217,7 +217,7 @@ static int rcu_qsctr_help(struct rcu_ctrlblk *rcp) | |||
217 | * are at it, given that any rcu quiescent state is also an rcu_bh | 217 | * are at it, given that any rcu quiescent state is also an rcu_bh |
218 | * quiescent state. Use "+" instead of "||" to defeat short circuiting. | 218 | * quiescent state. Use "+" instead of "||" to defeat short circuiting. |
219 | */ | 219 | */ |
220 | void rcu_sched_qs(int cpu) | 220 | void rcu_sched_qs(void) |
221 | { | 221 | { |
222 | unsigned long flags; | 222 | unsigned long flags; |
223 | 223 | ||
@@ -231,7 +231,7 @@ void rcu_sched_qs(int cpu) | |||
231 | /* | 231 | /* |
232 | * Record an rcu_bh quiescent state. | 232 | * Record an rcu_bh quiescent state. |
233 | */ | 233 | */ |
234 | void rcu_bh_qs(int cpu) | 234 | void rcu_bh_qs(void) |
235 | { | 235 | { |
236 | unsigned long flags; | 236 | unsigned long flags; |
237 | 237 | ||
@@ -251,9 +251,11 @@ void rcu_check_callbacks(int cpu, int user) | |||
251 | { | 251 | { |
252 | RCU_TRACE(check_cpu_stalls()); | 252 | RCU_TRACE(check_cpu_stalls()); |
253 | if (user || rcu_is_cpu_rrupt_from_idle()) | 253 | if (user || rcu_is_cpu_rrupt_from_idle()) |
254 | rcu_sched_qs(cpu); | 254 | rcu_sched_qs(); |
255 | else if (!in_softirq()) | 255 | else if (!in_softirq()) |
256 | rcu_bh_qs(cpu); | 256 | rcu_bh_qs(); |
257 | if (user) | ||
258 | rcu_note_voluntary_context_switch(current); | ||
257 | } | 259 | } |
258 | 260 | ||
259 | /* | 261 | /* |