aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2006-03-28 04:56:37 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:05 -0500
commit0a945022778f100115d0cb6234eb28fc1b15ccaf (patch)
tree85df4b5f7dd8bf59557091379c59b23b09115bf6 /kernel
parent631d6747e1d877a4baa924cb373b8b9511a53e5e (diff)
[PATCH] for_each_possible_cpu: fixes for generic part
replaces for_each_cpu with for_each_possible_cpu(). Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutorture.c4
-rw-r--r--kernel/sched.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index b4b362b5baf5..8154e7589d12 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -301,7 +301,7 @@ rcu_torture_printk(char *page)
301 long pipesummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 }; 301 long pipesummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };
302 long batchsummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 }; 302 long batchsummary[RCU_TORTURE_PIPE_LEN + 1] = { 0 };
303 303
304 for_each_cpu(cpu) { 304 for_each_possible_cpu(cpu) {
305 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { 305 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
306 pipesummary[i] += per_cpu(rcu_torture_count, cpu)[i]; 306 pipesummary[i] += per_cpu(rcu_torture_count, cpu)[i];
307 batchsummary[i] += per_cpu(rcu_torture_batch, cpu)[i]; 307 batchsummary[i] += per_cpu(rcu_torture_batch, cpu)[i];
@@ -535,7 +535,7 @@ rcu_torture_init(void)
535 atomic_set(&n_rcu_torture_error, 0); 535 atomic_set(&n_rcu_torture_error, 0);
536 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) 536 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++)
537 atomic_set(&rcu_torture_wcount[i], 0); 537 atomic_set(&rcu_torture_wcount[i], 0);
538 for_each_cpu(cpu) { 538 for_each_possible_cpu(cpu) {
539 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { 539 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
540 per_cpu(rcu_torture_count, cpu)[i] = 0; 540 per_cpu(rcu_torture_count, cpu)[i] = 0;
541 per_cpu(rcu_torture_batch, cpu)[i] = 0; 541 per_cpu(rcu_torture_batch, cpu)[i] = 0;
diff --git a/kernel/sched.c b/kernel/sched.c
index 7854ee516b92..a9ecac398bb9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1625,7 +1625,7 @@ unsigned long nr_uninterruptible(void)
1625{ 1625{
1626 unsigned long i, sum = 0; 1626 unsigned long i, sum = 0;
1627 1627
1628 for_each_cpu(i) 1628 for_each_possible_cpu(i)
1629 sum += cpu_rq(i)->nr_uninterruptible; 1629 sum += cpu_rq(i)->nr_uninterruptible;
1630 1630
1631 /* 1631 /*
@@ -1642,7 +1642,7 @@ unsigned long long nr_context_switches(void)
1642{ 1642{
1643 unsigned long long i, sum = 0; 1643 unsigned long long i, sum = 0;
1644 1644
1645 for_each_cpu(i) 1645 for_each_possible_cpu(i)
1646 sum += cpu_rq(i)->nr_switches; 1646 sum += cpu_rq(i)->nr_switches;
1647 1647
1648 return sum; 1648 return sum;
@@ -1652,7 +1652,7 @@ unsigned long nr_iowait(void)
1652{ 1652{
1653 unsigned long i, sum = 0; 1653 unsigned long i, sum = 0;
1654 1654
1655 for_each_cpu(i) 1655 for_each_possible_cpu(i)
1656 sum += atomic_read(&cpu_rq(i)->nr_iowait); 1656 sum += atomic_read(&cpu_rq(i)->nr_iowait);
1657 1657
1658 return sum; 1658 return sum;
@@ -6080,7 +6080,7 @@ void __init sched_init(void)
6080 runqueue_t *rq; 6080 runqueue_t *rq;
6081 int i, j, k; 6081 int i, j, k;
6082 6082
6083 for_each_cpu(i) { 6083 for_each_possible_cpu(i) {
6084 prio_array_t *array; 6084 prio_array_t *array;
6085 6085
6086 rq = cpu_rq(i); 6086 rq = cpu_rq(i);