diff options
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index c7d00700fc4e..e4971192fa9c 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -1144,11 +1144,9 @@ void rcu_check_callbacks(int cpu, int user) | |||
1144 | /* | 1144 | /* |
1145 | * Scan the leaf rcu_node structures, processing dyntick state for any that | 1145 | * Scan the leaf rcu_node structures, processing dyntick state for any that |
1146 | * have not yet encountered a quiescent state, using the function specified. | 1146 | * have not yet encountered a quiescent state, using the function specified. |
1147 | * Returns 1 if the current grace period ends while scanning (possibly | ||
1148 | * because we made it end). | ||
1149 | */ | 1147 | */ |
1150 | static int rcu_process_dyntick(struct rcu_state *rsp, | 1148 | static void rcu_process_dyntick(struct rcu_state *rsp, |
1151 | int (*f)(struct rcu_data *)) | 1149 | int (*f)(struct rcu_data *)) |
1152 | { | 1150 | { |
1153 | unsigned long bit; | 1151 | unsigned long bit; |
1154 | int cpu; | 1152 | int cpu; |
@@ -1161,7 +1159,7 @@ static int rcu_process_dyntick(struct rcu_state *rsp, | |||
1161 | spin_lock_irqsave(&rnp->lock, flags); | 1159 | spin_lock_irqsave(&rnp->lock, flags); |
1162 | if (rnp->completed != rsp->gpnum - 1) { | 1160 | if (rnp->completed != rsp->gpnum - 1) { |
1163 | spin_unlock_irqrestore(&rnp->lock, flags); | 1161 | spin_unlock_irqrestore(&rnp->lock, flags); |
1164 | return 1; | 1162 | return; |
1165 | } | 1163 | } |
1166 | if (rnp->qsmask == 0) { | 1164 | if (rnp->qsmask == 0) { |
1167 | spin_unlock_irqrestore(&rnp->lock, flags); | 1165 | spin_unlock_irqrestore(&rnp->lock, flags); |
@@ -1181,7 +1179,6 @@ static int rcu_process_dyntick(struct rcu_state *rsp, | |||
1181 | } | 1179 | } |
1182 | spin_unlock_irqrestore(&rnp->lock, flags); | 1180 | spin_unlock_irqrestore(&rnp->lock, flags); |
1183 | } | 1181 | } |
1184 | return 0; | ||
1185 | } | 1182 | } |
1186 | 1183 | ||
1187 | /* | 1184 | /* |
@@ -1193,7 +1190,6 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) | |||
1193 | unsigned long flags; | 1190 | unsigned long flags; |
1194 | struct rcu_node *rnp = rcu_get_root(rsp); | 1191 | struct rcu_node *rnp = rcu_get_root(rsp); |
1195 | u8 forcenow; | 1192 | u8 forcenow; |
1196 | u8 gpdone; | ||
1197 | 1193 | ||
1198 | if (!rcu_gp_in_progress(rsp)) | 1194 | if (!rcu_gp_in_progress(rsp)) |
1199 | return; /* No grace period in progress, nothing to force. */ | 1195 | return; /* No grace period in progress, nothing to force. */ |
@@ -1226,10 +1222,9 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) | |||
1226 | break; /* So gcc recognizes the dead code. */ | 1222 | break; /* So gcc recognizes the dead code. */ |
1227 | 1223 | ||
1228 | /* Record dyntick-idle state. */ | 1224 | /* Record dyntick-idle state. */ |
1229 | gpdone = rcu_process_dyntick(rsp, | 1225 | rcu_process_dyntick(rsp, dyntick_save_progress_counter); |
1230 | dyntick_save_progress_counter); | ||
1231 | spin_lock(&rnp->lock); /* irqs already disabled */ | 1226 | spin_lock(&rnp->lock); /* irqs already disabled */ |
1232 | if (gpdone) | 1227 | if (!rcu_gp_in_progress(rsp)) |
1233 | break; | 1228 | break; |
1234 | /* fall into next case. */ | 1229 | /* fall into next case. */ |
1235 | 1230 | ||
@@ -1249,7 +1244,7 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) | |||
1249 | 1244 | ||
1250 | /* Check dyntick-idle state, send IPI to laggarts. */ | 1245 | /* Check dyntick-idle state, send IPI to laggarts. */ |
1251 | spin_unlock(&rnp->lock); /* irqs remain disabled */ | 1246 | spin_unlock(&rnp->lock); /* irqs remain disabled */ |
1252 | gpdone = rcu_process_dyntick(rsp, rcu_implicit_dynticks_qs); | 1247 | rcu_process_dyntick(rsp, rcu_implicit_dynticks_qs); |
1253 | 1248 | ||
1254 | /* Leave state in case more forcing is required. */ | 1249 | /* Leave state in case more forcing is required. */ |
1255 | 1250 | ||