[PATCH] remove for_each_cpu()
authorAndrew Morton <akpm@osdl.org>
Sun, 25 Jun 2006 12:46:43 +0000 (05:46 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:00:54 +0000 (10:00 -0700)
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>
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
arch/ia64/kernel/topology.c
arch/powerpc/platforms/cell/interrupt.c
include/linux/cpumask.h
net/ipv4/netfilter/ip_tables.c

index 05668e3598c030e739fa03db88d47553017b57ad..5fd65325b81afd2467efb5e5602edc4e4dc3ebee 100644 (file)
@@ -371,11 +371,11 @@ static int acpi_cpufreq_early_init_acpi(void)
 
        dprintk("acpi_cpufreq_early_init\n");
 
-       for_each_cpu(i) {
+       for_each_possible_cpu(i) {
                data = kzalloc(sizeof(struct acpi_processor_performance), 
                        GFP_KERNEL);
                if (!data) {
-                       for_each_cpu(j) {
+                       for_each_possible_cpu(j) {
                                kfree(acpi_perf_data[j]);
                                acpi_perf_data[j] = NULL;
                        }
@@ -584,7 +584,7 @@ acpi_cpufreq_exit (void)
 
        cpufreq_unregister_driver(&acpi_cpufreq_driver);
 
-       for_each_cpu(i) {
+       for_each_possible_cpu(i) {
                kfree(acpi_perf_data[i]);
                acpi_perf_data[i] = NULL;
        }
index 31c3a5baaa7fd25afdff2b5454a2a8cdf3887664..f7e4356f68202f472d4a94aa0684d05244792e1a 100644 (file)
@@ -361,11 +361,11 @@ static int centrino_cpu_early_init_acpi(void)
        unsigned int    i, j;
        struct acpi_processor_performance       *data;
 
-       for_each_cpu(i) {
+       for_each_possible_cpu(i) {
                data = kzalloc(sizeof(struct acpi_processor_performance), 
                                GFP_KERNEL);
                if (!data) {
-                       for_each_cpu(j) {
+                       for_each_possible_cpu(j) {
                                kfree(acpi_perf_data[j]);
                                acpi_perf_data[j] = NULL;
                        }
@@ -805,7 +805,7 @@ static void __exit centrino_exit(void)
        cpufreq_unregister_driver(&centrino_driver);
 
 #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
-       for_each_cpu(j) {
+       for_each_possible_cpu(j) {
                kfree(acpi_perf_data[j]);
                acpi_perf_data[j] = NULL;
        }
index 4f3a16b37f8f840a656996d3cc7fbbbeeddaabee..879edb51d1e0e1b2c29698815127dc8b215f7067 100644 (file)
@@ -166,7 +166,7 @@ static void cache_shared_cpu_map_setup( unsigned int cpu,
 
        num_shared = (int) csi.num_shared;
        do {
-               for_each_cpu(j)
+               for_each_possible_cpu(j)
                        if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id
                                && cpu_data(j)->core_id == csi.log1_cid
                                && cpu_data(j)->thread_id == csi.log1_tid)
index f4e2d8805c9e3299cce5815506caeb7cc1fe6fb3..1bbf822b4efcafada7f9181af9de762772f37f29 100644 (file)
@@ -180,7 +180,7 @@ static int setup_iic_hardcoded(void)
        unsigned long regs;
        struct iic *iic;
 
-       for_each_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                iic = &per_cpu(iic, cpu);
                nodeid = cpu/2;
 
index 9cbb781d6f808b361a9f7f1a4df50f8ee9bde9a9..fb5b761e3444972c36416aecc0b2104322f94038 100644 (file)
@@ -405,7 +405,6 @@ int __any_online_cpu(const cpumask_t *mask);
 #define any_online_cpu(mask)           0
 #endif
 
-#define for_each_cpu(cpu)  for_each_cpu_mask((cpu), cpu_possible_map)
 #define for_each_possible_cpu(cpu)  for_each_cpu_mask((cpu), cpu_possible_map)
 #define for_each_online_cpu(cpu)  for_each_cpu_mask((cpu), cpu_online_map)
 #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
index cee3397ec27765dcdeab77890847ac59b2cb2434..706c0025ec5e43768c7c9dadfb30e3782c275d67 100644 (file)
@@ -1761,7 +1761,7 @@ translate_compat_table(const char *name,
                goto free_newinfo;
 
        /* And one copy for every other CPU */
-       for_each_cpu(i)
+       for_each_possible_cpu(i)
                if (newinfo->entries[i] && newinfo->entries[i] != entry1)
                        memcpy(newinfo->entries[i], entry1, newinfo->size);