diff options
author | Andrew Morton <akpm@osdl.org> | 2006-06-25 08:46:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:00:54 -0400 |
commit | fb1bb34d45400f12e0a33f8c487b3795674908a7 (patch) | |
tree | 11c593c83eff5a83999f4feee0d8937d1f575712 | |
parent | 1e48275adc8c94c3281e646c8beb829f8e6f5bfc (diff) |
[PATCH] remove for_each_cpu()
Convert a few stragglers over to for_each_possible_cpu(), remove
for_each_cpu().
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 2 | ||||
-rw-r--r-- | include/linux/cpumask.h | 1 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 2 |
6 files changed, 9 insertions, 10 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 05668e3598c0..5fd65325b81a 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -371,11 +371,11 @@ static int acpi_cpufreq_early_init_acpi(void) | |||
371 | 371 | ||
372 | dprintk("acpi_cpufreq_early_init\n"); | 372 | dprintk("acpi_cpufreq_early_init\n"); |
373 | 373 | ||
374 | for_each_cpu(i) { | 374 | for_each_possible_cpu(i) { |
375 | data = kzalloc(sizeof(struct acpi_processor_performance), | 375 | data = kzalloc(sizeof(struct acpi_processor_performance), |
376 | GFP_KERNEL); | 376 | GFP_KERNEL); |
377 | if (!data) { | 377 | if (!data) { |
378 | for_each_cpu(j) { | 378 | for_each_possible_cpu(j) { |
379 | kfree(acpi_perf_data[j]); | 379 | kfree(acpi_perf_data[j]); |
380 | acpi_perf_data[j] = NULL; | 380 | acpi_perf_data[j] = NULL; |
381 | } | 381 | } |
@@ -584,7 +584,7 @@ acpi_cpufreq_exit (void) | |||
584 | 584 | ||
585 | cpufreq_unregister_driver(&acpi_cpufreq_driver); | 585 | cpufreq_unregister_driver(&acpi_cpufreq_driver); |
586 | 586 | ||
587 | for_each_cpu(i) { | 587 | for_each_possible_cpu(i) { |
588 | kfree(acpi_perf_data[i]); | 588 | kfree(acpi_perf_data[i]); |
589 | acpi_perf_data[i] = NULL; | 589 | acpi_perf_data[i] = NULL; |
590 | } | 590 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 31c3a5baaa7f..f7e4356f6820 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -361,11 +361,11 @@ static int centrino_cpu_early_init_acpi(void) | |||
361 | unsigned int i, j; | 361 | unsigned int i, j; |
362 | struct acpi_processor_performance *data; | 362 | struct acpi_processor_performance *data; |
363 | 363 | ||
364 | for_each_cpu(i) { | 364 | for_each_possible_cpu(i) { |
365 | data = kzalloc(sizeof(struct acpi_processor_performance), | 365 | data = kzalloc(sizeof(struct acpi_processor_performance), |
366 | GFP_KERNEL); | 366 | GFP_KERNEL); |
367 | if (!data) { | 367 | if (!data) { |
368 | for_each_cpu(j) { | 368 | for_each_possible_cpu(j) { |
369 | kfree(acpi_perf_data[j]); | 369 | kfree(acpi_perf_data[j]); |
370 | acpi_perf_data[j] = NULL; | 370 | acpi_perf_data[j] = NULL; |
371 | } | 371 | } |
@@ -805,7 +805,7 @@ static void __exit centrino_exit(void) | |||
805 | cpufreq_unregister_driver(¢rino_driver); | 805 | cpufreq_unregister_driver(¢rino_driver); |
806 | 806 | ||
807 | #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI | 807 | #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI |
808 | for_each_cpu(j) { | 808 | for_each_possible_cpu(j) { |
809 | kfree(acpi_perf_data[j]); | 809 | kfree(acpi_perf_data[j]); |
810 | acpi_perf_data[j] = NULL; | 810 | acpi_perf_data[j] = NULL; |
811 | } | 811 | } |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 4f3a16b37f8f..879edb51d1e0 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -166,7 +166,7 @@ static void cache_shared_cpu_map_setup( unsigned int cpu, | |||
166 | 166 | ||
167 | num_shared = (int) csi.num_shared; | 167 | num_shared = (int) csi.num_shared; |
168 | do { | 168 | do { |
169 | for_each_cpu(j) | 169 | for_each_possible_cpu(j) |
170 | if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id | 170 | if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id |
171 | && cpu_data(j)->core_id == csi.log1_cid | 171 | && cpu_data(j)->core_id == csi.log1_cid |
172 | && cpu_data(j)->thread_id == csi.log1_tid) | 172 | && cpu_data(j)->thread_id == csi.log1_tid) |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index f4e2d8805c9e..1bbf822b4efc 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -180,7 +180,7 @@ static int setup_iic_hardcoded(void) | |||
180 | unsigned long regs; | 180 | unsigned long regs; |
181 | struct iic *iic; | 181 | struct iic *iic; |
182 | 182 | ||
183 | for_each_cpu(cpu) { | 183 | for_each_possible_cpu(cpu) { |
184 | iic = &per_cpu(iic, cpu); | 184 | iic = &per_cpu(iic, cpu); |
185 | nodeid = cpu/2; | 185 | nodeid = cpu/2; |
186 | 186 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9cbb781d6f80..fb5b761e3444 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -405,7 +405,6 @@ int __any_online_cpu(const cpumask_t *mask); | |||
405 | #define any_online_cpu(mask) 0 | 405 | #define any_online_cpu(mask) 0 |
406 | #endif | 406 | #endif |
407 | 407 | ||
408 | #define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) | ||
409 | #define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) | 408 | #define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) |
410 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | 409 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) |
411 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | 410 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index cee3397ec277..706c0025ec5e 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -1761,7 +1761,7 @@ translate_compat_table(const char *name, | |||
1761 | goto free_newinfo; | 1761 | goto free_newinfo; |
1762 | 1762 | ||
1763 | /* And one copy for every other CPU */ | 1763 | /* And one copy for every other CPU */ |
1764 | for_each_cpu(i) | 1764 | for_each_possible_cpu(i) |
1765 | if (newinfo->entries[i] && newinfo->entries[i] != entry1) | 1765 | if (newinfo->entries[i] && newinfo->entries[i] != entry1) |
1766 | memcpy(newinfo->entries[i], entry1, newinfo->size); | 1766 | memcpy(newinfo->entries[i], entry1, newinfo->size); |
1767 | 1767 | ||