diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-04-27 21:06:08 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-07-12 17:27:50 -0400 |
| commit | a66ae8ae35de60a85d2d89689d8c2d6a4dc15d85 (patch) | |
| tree | a1fba2ce4baff91377c82c331793ba73c530d264 /kernel/rcu/tree.c | |
| parent | 67e14c1e39d2d956300b3d6ad00f7708e3285531 (diff) | |
rcu: Convert rcu_gpnum_ovf() to ->gp_seq
This commit converts rcu_gpnum_ovf() to use ->gp_seq instead of ->gpnum.
Same size unsigned long, so same approach.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
| -rw-r--r-- | kernel/rcu/tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index bcd659e65dfd..de2e2c5d64bb 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -1089,14 +1089,15 @@ static int rcu_is_cpu_rrupt_from_idle(void) | |||
| 1089 | /* | 1089 | /* |
| 1090 | * We are reporting a quiescent state on behalf of some other CPU, so | 1090 | * We are reporting a quiescent state on behalf of some other CPU, so |
| 1091 | * it is our responsibility to check for and handle potential overflow | 1091 | * it is our responsibility to check for and handle potential overflow |
| 1092 | * of the rcu_node ->gpnum counter with respect to the rcu_data counters. | 1092 | * of the rcu_node ->gp_seq counter with respect to the rcu_data counters. |
| 1093 | * After all, the CPU might be in deep idle state, and thus executing no | 1093 | * After all, the CPU might be in deep idle state, and thus executing no |
| 1094 | * code whatsoever. | 1094 | * code whatsoever. |
| 1095 | */ | 1095 | */ |
| 1096 | static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp) | 1096 | static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp) |
| 1097 | { | 1097 | { |
| 1098 | raw_lockdep_assert_held_rcu_node(rnp); | 1098 | raw_lockdep_assert_held_rcu_node(rnp); |
| 1099 | if (ULONG_CMP_LT(READ_ONCE(rdp->gpnum) + ULONG_MAX / 4, rnp->gpnum)) | 1099 | if (ULONG_CMP_LT(rcu_seq_current(&rdp->gp_seq) + ULONG_MAX / 4, |
| 1100 | rnp->gp_seq)) | ||
| 1100 | WRITE_ONCE(rdp->gpwrap, true); | 1101 | WRITE_ONCE(rdp->gpwrap, true); |
| 1101 | if (ULONG_CMP_LT(rdp->rcu_iw_gpnum + ULONG_MAX / 4, rnp->gpnum)) | 1102 | if (ULONG_CMP_LT(rdp->rcu_iw_gpnum + ULONG_MAX / 4, rnp->gpnum)) |
| 1102 | rdp->rcu_iw_gpnum = rnp->gpnum + ULONG_MAX / 4; | 1103 | rdp->rcu_iw_gpnum = rnp->gpnum + ULONG_MAX / 4; |
