diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-10-08 13:54:03 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-11-08 14:50:11 -0500 |
commit | 7b2e6011f150c42235c4a541d20cf6891afe878a (patch) | |
tree | a02ac239103e97847ec29183d8aaa45c385a3335 /kernel/rcutree.c | |
parent | 489832609a1ad7189d11715d8cefb457d90182c5 (diff) |
rcu: Rename ->onofflock to ->orphan_lock
The ->onofflock field in the rcu_state structure at one time synchronized
CPU-hotplug operations for RCU. However, its scope has decreased over time
so that it now only protects the lists of orphaned RCU callbacks. This
commit therefore renames it to ->orphan_lock to reflect its current use.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index ac8aed8ee417..89148860e2ba 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -70,7 +70,7 @@ static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; | |||
70 | .fqs_state = RCU_GP_IDLE, \ | 70 | .fqs_state = RCU_GP_IDLE, \ |
71 | .gpnum = -300, \ | 71 | .gpnum = -300, \ |
72 | .completed = -300, \ | 72 | .completed = -300, \ |
73 | .onofflock = __RAW_SPIN_LOCK_UNLOCKED(&sname##_state.onofflock), \ | 73 | .orphan_lock = __RAW_SPIN_LOCK_UNLOCKED(&sname##_state.orphan_lock), \ |
74 | .orphan_nxttail = &sname##_state.orphan_nxtlist, \ | 74 | .orphan_nxttail = &sname##_state.orphan_nxtlist, \ |
75 | .orphan_donetail = &sname##_state.orphan_donelist, \ | 75 | .orphan_donetail = &sname##_state.orphan_donelist, \ |
76 | .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ | 76 | .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ |
@@ -1573,7 +1573,7 @@ rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1573 | /* | 1573 | /* |
1574 | * Send the specified CPU's RCU callbacks to the orphanage. The | 1574 | * Send the specified CPU's RCU callbacks to the orphanage. The |
1575 | * specified CPU must be offline, and the caller must hold the | 1575 | * specified CPU must be offline, and the caller must hold the |
1576 | * ->onofflock. | 1576 | * ->orphan_lock. |
1577 | */ | 1577 | */ |
1578 | static void | 1578 | static void |
1579 | rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, | 1579 | rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, |
@@ -1623,7 +1623,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, | |||
1623 | 1623 | ||
1624 | /* | 1624 | /* |
1625 | * Adopt the RCU callbacks from the specified rcu_state structure's | 1625 | * Adopt the RCU callbacks from the specified rcu_state structure's |
1626 | * orphanage. The caller must hold the ->onofflock. | 1626 | * orphanage. The caller must hold the ->orphan_lock. |
1627 | */ | 1627 | */ |
1628 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) | 1628 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) |
1629 | { | 1629 | { |
@@ -1702,7 +1702,7 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
1702 | 1702 | ||
1703 | /* Exclude any attempts to start a new grace period. */ | 1703 | /* Exclude any attempts to start a new grace period. */ |
1704 | mutex_lock(&rsp->onoff_mutex); | 1704 | mutex_lock(&rsp->onoff_mutex); |
1705 | raw_spin_lock_irqsave(&rsp->onofflock, flags); | 1705 | raw_spin_lock_irqsave(&rsp->orphan_lock, flags); |
1706 | 1706 | ||
1707 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ | 1707 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ |
1708 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); | 1708 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); |
@@ -1729,10 +1729,10 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
1729 | /* | 1729 | /* |
1730 | * We still hold the leaf rcu_node structure lock here, and | 1730 | * We still hold the leaf rcu_node structure lock here, and |
1731 | * irqs are still disabled. The reason for this subterfuge is | 1731 | * irqs are still disabled. The reason for this subterfuge is |
1732 | * because invoking rcu_report_unblock_qs_rnp() with ->onofflock | 1732 | * because invoking rcu_report_unblock_qs_rnp() with ->orphan_lock |
1733 | * held leads to deadlock. | 1733 | * held leads to deadlock. |
1734 | */ | 1734 | */ |
1735 | raw_spin_unlock(&rsp->onofflock); /* irqs remain disabled. */ | 1735 | raw_spin_unlock(&rsp->orphan_lock); /* irqs remain disabled. */ |
1736 | rnp = rdp->mynode; | 1736 | rnp = rdp->mynode; |
1737 | if (need_report & RCU_OFL_TASKS_NORM_GP) | 1737 | if (need_report & RCU_OFL_TASKS_NORM_GP) |
1738 | rcu_report_unblock_qs_rnp(rnp, flags); | 1738 | rcu_report_unblock_qs_rnp(rnp, flags); |