diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-01-04 18:09:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-13 03:06:03 -0500 |
commit | eb1ba45f1e7f6e626fefc063b340c7cbec9bd8c7 (patch) | |
tree | e5d37e450c3c2c96863060c9a7b51a90c03fe363 | |
parent | 39c0bbfc07c6e28db7346d0e11106f2d045d3035 (diff) |
rcu: Eliminate second argument of rcu_process_dyntick()
At this point, the second argument to all calls to
rcu_process_dyntick() is a function of the same field of the
structure passed in as the first argument, namely, rsp->gpnum-1.
So propagate rsp->gpnum-1 to all uses of the second argument
within rcu_process_dyntick() and then eliminate the second
argument.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12626465503786-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/rcutree.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 62b64332effb..c7d00700fc4e 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -1147,7 +1147,7 @@ void rcu_check_callbacks(int cpu, int user) | |||
1147 | * Returns 1 if the current grace period ends while scanning (possibly | 1147 | * Returns 1 if the current grace period ends while scanning (possibly |
1148 | * because we made it end). | 1148 | * because we made it end). |
1149 | */ | 1149 | */ |
1150 | static int rcu_process_dyntick(struct rcu_state *rsp, long lastcomp, | 1150 | static int rcu_process_dyntick(struct rcu_state *rsp, |
1151 | int (*f)(struct rcu_data *)) | 1151 | int (*f)(struct rcu_data *)) |
1152 | { | 1152 | { |
1153 | unsigned long bit; | 1153 | unsigned long bit; |
@@ -1159,7 +1159,7 @@ static int rcu_process_dyntick(struct rcu_state *rsp, long lastcomp, | |||
1159 | rcu_for_each_leaf_node(rsp, rnp) { | 1159 | rcu_for_each_leaf_node(rsp, rnp) { |
1160 | mask = 0; | 1160 | mask = 0; |
1161 | spin_lock_irqsave(&rnp->lock, flags); | 1161 | spin_lock_irqsave(&rnp->lock, flags); |
1162 | if (rnp->completed != lastcomp) { | 1162 | if (rnp->completed != rsp->gpnum - 1) { |
1163 | spin_unlock_irqrestore(&rnp->lock, flags); | 1163 | spin_unlock_irqrestore(&rnp->lock, flags); |
1164 | return 1; | 1164 | return 1; |
1165 | } | 1165 | } |
@@ -1173,7 +1173,7 @@ static int rcu_process_dyntick(struct rcu_state *rsp, long lastcomp, | |||
1173 | if ((rnp->qsmask & bit) != 0 && f(rsp->rda[cpu])) | 1173 | if ((rnp->qsmask & bit) != 0 && f(rsp->rda[cpu])) |
1174 | mask |= bit; | 1174 | mask |= bit; |
1175 | } | 1175 | } |
1176 | if (mask != 0 && rnp->completed == lastcomp) { | 1176 | if (mask != 0 && rnp->completed == rsp->gpnum - 1) { |
1177 | 1177 | ||
1178 | /* rcu_report_qs_rnp() releases rnp->lock. */ | 1178 | /* rcu_report_qs_rnp() releases rnp->lock. */ |
1179 | rcu_report_qs_rnp(mask, rsp, rnp, flags); | 1179 | rcu_report_qs_rnp(mask, rsp, rnp, flags); |
@@ -1226,7 +1226,7 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) | |||
1226 | break; /* So gcc recognizes the dead code. */ | 1226 | break; /* So gcc recognizes the dead code. */ |
1227 | 1227 | ||
1228 | /* Record dyntick-idle state. */ | 1228 | /* Record dyntick-idle state. */ |
1229 | gpdone = rcu_process_dyntick(rsp, rsp->gpnum - 1, | 1229 | gpdone = rcu_process_dyntick(rsp, |
1230 | dyntick_save_progress_counter); | 1230 | dyntick_save_progress_counter); |
1231 | spin_lock(&rnp->lock); /* irqs already disabled */ | 1231 | spin_lock(&rnp->lock); /* irqs already disabled */ |
1232 | if (gpdone) | 1232 | if (gpdone) |
@@ -1249,8 +1249,7 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) | |||
1249 | 1249 | ||
1250 | /* Check dyntick-idle state, send IPI to laggarts. */ | 1250 | /* Check dyntick-idle state, send IPI to laggarts. */ |
1251 | spin_unlock(&rnp->lock); /* irqs remain disabled */ | 1251 | spin_unlock(&rnp->lock); /* irqs remain disabled */ |
1252 | gpdone = rcu_process_dyntick(rsp, rsp->gpnum - 1, | 1252 | gpdone = rcu_process_dyntick(rsp, rcu_implicit_dynticks_qs); |
1253 | rcu_implicit_dynticks_qs); | ||
1254 | 1253 | ||
1255 | /* Leave state in case more forcing is required. */ | 1254 | /* Leave state in case more forcing is required. */ |
1256 | 1255 | ||