diff options
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e8624ebf2320..ae4a553e37ce 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -767,10 +767,10 @@ cpu_quiet_msk(unsigned long mask, struct rcu_state *rsp, struct rcu_node *rnp, | |||
767 | 767 | ||
768 | /* | 768 | /* |
769 | * Record a quiescent state for the specified CPU, which must either be | 769 | * Record a quiescent state for the specified CPU, which must either be |
770 | * the current CPU or an offline CPU. The lastcomp argument is used to | 770 | * the current CPU. The lastcomp argument is used to make sure we are |
771 | * make sure we are still in the grace period of interest. We don't want | 771 | * still in the grace period of interest. We don't want to end the current |
772 | * to end the current grace period based on quiescent states detected in | 772 | * grace period based on quiescent states detected in an earlier grace |
773 | * an earlier grace period! | 773 | * period! |
774 | */ | 774 | */ |
775 | static void | 775 | static void |
776 | cpu_quiet(int cpu, struct rcu_state *rsp, struct rcu_data *rdp, long lastcomp) | 776 | cpu_quiet(int cpu, struct rcu_state *rsp, struct rcu_data *rdp, long lastcomp) |
@@ -805,7 +805,6 @@ cpu_quiet(int cpu, struct rcu_state *rsp, struct rcu_data *rdp, long lastcomp) | |||
805 | * This GP can't end until cpu checks in, so all of our | 805 | * This GP can't end until cpu checks in, so all of our |
806 | * callbacks can be processed during the next GP. | 806 | * callbacks can be processed during the next GP. |
807 | */ | 807 | */ |
808 | rdp = rsp->rda[smp_processor_id()]; | ||
809 | rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; | 808 | rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; |
810 | 809 | ||
811 | cpu_quiet_msk(mask, rsp, rnp, flags); /* releases rnp->lock */ | 810 | cpu_quiet_msk(mask, rsp, rnp, flags); /* releases rnp->lock */ |
@@ -881,9 +880,6 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp) | |||
881 | 880 | ||
882 | spin_unlock(&rsp->onofflock); /* irqs remain disabled. */ | 881 | spin_unlock(&rsp->onofflock); /* irqs remain disabled. */ |
883 | 882 | ||
884 | /* Being offline is a quiescent state, so go record it. */ | ||
885 | cpu_quiet(cpu, rsp, rdp, lastcomp); | ||
886 | |||
887 | /* | 883 | /* |
888 | * Move callbacks from the outgoing CPU to the running CPU. | 884 | * Move callbacks from the outgoing CPU to the running CPU. |
889 | * Note that the outgoing CPU is now quiscent, so it is now | 885 | * Note that the outgoing CPU is now quiscent, so it is now |
@@ -1448,20 +1444,7 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptable) | |||
1448 | rnp = rnp->parent; | 1444 | rnp = rnp->parent; |
1449 | } while (rnp != NULL && !(rnp->qsmaskinit & mask)); | 1445 | } while (rnp != NULL && !(rnp->qsmaskinit & mask)); |
1450 | 1446 | ||
1451 | spin_unlock(&rsp->onofflock); /* irqs remain disabled. */ | 1447 | spin_unlock_irqrestore(&rsp->onofflock, flags); |
1452 | |||
1453 | /* | ||
1454 | * A new grace period might start here. If so, we will be part of | ||
1455 | * it, and its gpnum will be greater than ours, so we will | ||
1456 | * participate. It is also possible for the gpnum to have been | ||
1457 | * incremented before this function was called, and the bitmasks | ||
1458 | * to not be filled out until now, in which case we will also | ||
1459 | * participate due to our gpnum being behind. | ||
1460 | */ | ||
1461 | |||
1462 | /* Since it is coming online, the CPU is in a quiescent state. */ | ||
1463 | cpu_quiet(cpu, rsp, rdp, lastcomp); | ||
1464 | local_irq_restore(flags); | ||
1465 | } | 1448 | } |
1466 | 1449 | ||
1467 | static void __cpuinit rcu_online_cpu(int cpu) | 1450 | static void __cpuinit rcu_online_cpu(int cpu) |