diff options
Diffstat (limited to 'kernel/rcupreempt.c')
-rw-r--r-- | kernel/rcupreempt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index 7d777c9f394c..0053ce56e326 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -159,6 +159,8 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_dyntick_sched, rcu_dyntick_sched | |||
159 | .dynticks = 1, | 159 | .dynticks = 1, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static int rcu_pending(int cpu); | ||
163 | |||
162 | void rcu_sched_qs(int cpu) | 164 | void rcu_sched_qs(int cpu) |
163 | { | 165 | { |
164 | struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu); | 166 | struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu); |
@@ -961,7 +963,10 @@ static void rcu_check_mb(int cpu) | |||
961 | void rcu_check_callbacks(int cpu, int user) | 963 | void rcu_check_callbacks(int cpu, int user) |
962 | { | 964 | { |
963 | unsigned long flags; | 965 | unsigned long flags; |
964 | struct rcu_data *rdp = RCU_DATA_CPU(cpu); | 966 | struct rcu_data *rdp; |
967 | |||
968 | if (!rcu_pending(cpu)) | ||
969 | return; /* if nothing for RCU to do. */ | ||
965 | 970 | ||
966 | /* | 971 | /* |
967 | * If this CPU took its interrupt from user mode or from the | 972 | * If this CPU took its interrupt from user mode or from the |
@@ -976,6 +981,7 @@ void rcu_check_callbacks(int cpu, int user) | |||
976 | * CPUs to happen after any such write. | 981 | * CPUs to happen after any such write. |
977 | */ | 982 | */ |
978 | 983 | ||
984 | rdp = RCU_DATA_CPU(cpu); | ||
979 | if (user || | 985 | if (user || |
980 | (idle_cpu(cpu) && !in_softirq() && | 986 | (idle_cpu(cpu) && !in_softirq() && |
981 | hardirq_count() <= (1 << HARDIRQ_SHIFT))) { | 987 | hardirq_count() <= (1 << HARDIRQ_SHIFT))) { |
@@ -1382,7 +1388,7 @@ int rcu_needs_cpu(int cpu) | |||
1382 | rdp->waitschedlist != NULL); | 1388 | rdp->waitschedlist != NULL); |
1383 | } | 1389 | } |
1384 | 1390 | ||
1385 | int rcu_pending(int cpu) | 1391 | static int rcu_pending(int cpu) |
1386 | { | 1392 | { |
1387 | struct rcu_data *rdp = RCU_DATA_CPU(cpu); | 1393 | struct rcu_data *rdp = RCU_DATA_CPU(cpu); |
1388 | 1394 | ||