Commit fb1bb34d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove for_each_cpu()

Convert a few stragglers over to for_each_possible_cpu(), remove
for_each_cpu().
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1e48275a
...@@ -371,11 +371,11 @@ static int acpi_cpufreq_early_init_acpi(void) ...@@ -371,11 +371,11 @@ static int acpi_cpufreq_early_init_acpi(void)
dprintk("acpi_cpufreq_early_init\n"); dprintk("acpi_cpufreq_early_init\n");
for_each_cpu(i) { for_each_possible_cpu(i) {
data = kzalloc(sizeof(struct acpi_processor_performance), data = kzalloc(sizeof(struct acpi_processor_performance),
GFP_KERNEL); GFP_KERNEL);
if (!data) { if (!data) {
for_each_cpu(j) { for_each_possible_cpu(j) {
kfree(acpi_perf_data[j]); kfree(acpi_perf_data[j]);
acpi_perf_data[j] = NULL; acpi_perf_data[j] = NULL;
} }
...@@ -584,7 +584,7 @@ acpi_cpufreq_exit (void) ...@@ -584,7 +584,7 @@ acpi_cpufreq_exit (void)
cpufreq_unregister_driver(&acpi_cpufreq_driver); cpufreq_unregister_driver(&acpi_cpufreq_driver);
for_each_cpu(i) { for_each_possible_cpu(i) {
kfree(acpi_perf_data[i]); kfree(acpi_perf_data[i]);
acpi_perf_data[i] = NULL; acpi_perf_data[i] = NULL;
} }
......
...@@ -361,11 +361,11 @@ static int centrino_cpu_early_init_acpi(void) ...@@ -361,11 +361,11 @@ static int centrino_cpu_early_init_acpi(void)
unsigned int i, j; unsigned int i, j;
struct acpi_processor_performance *data; struct acpi_processor_performance *data;
for_each_cpu(i) { for_each_possible_cpu(i) {
data = kzalloc(sizeof(struct acpi_processor_performance), data = kzalloc(sizeof(struct acpi_processor_performance),
GFP_KERNEL); GFP_KERNEL);
if (!data) { if (!data) {
for_each_cpu(j) { for_each_possible_cpu(j) {
kfree(acpi_perf_data[j]); kfree(acpi_perf_data[j]);
acpi_perf_data[j] = NULL; acpi_perf_data[j] = NULL;
} }
...@@ -805,7 +805,7 @@ static void __exit centrino_exit(void) ...@@ -805,7 +805,7 @@ static void __exit centrino_exit(void)
cpufreq_unregister_driver(&centrino_driver); cpufreq_unregister_driver(&centrino_driver);
#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
for_each_cpu(j) { for_each_possible_cpu(j) {
kfree(acpi_perf_data[j]); kfree(acpi_perf_data[j]);
acpi_perf_data[j] = NULL; acpi_perf_data[j] = NULL;
} }
......
...@@ -166,7 +166,7 @@ static void cache_shared_cpu_map_setup( unsigned int cpu, ...@@ -166,7 +166,7 @@ static void cache_shared_cpu_map_setup( unsigned int cpu,
num_shared = (int) csi.num_shared; num_shared = (int) csi.num_shared;
do { do {
for_each_cpu(j) for_each_possible_cpu(j)
if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id
&& cpu_data(j)->core_id == csi.log1_cid && cpu_data(j)->core_id == csi.log1_cid
&& cpu_data(j)->thread_id == csi.log1_tid) && cpu_data(j)->thread_id == csi.log1_tid)
......
...@@ -180,7 +180,7 @@ static int setup_iic_hardcoded(void) ...@@ -180,7 +180,7 @@ static int setup_iic_hardcoded(void)
unsigned long regs; unsigned long regs;
struct iic *iic; struct iic *iic;
for_each_cpu(cpu) { for_each_possible_cpu(cpu) {
iic = &per_cpu(iic, cpu); iic = &per_cpu(iic, cpu);
nodeid = cpu/2; nodeid = cpu/2;
......
...@@ -405,7 +405,6 @@ int __any_online_cpu(const cpumask_t *mask); ...@@ -405,7 +405,6 @@ int __any_online_cpu(const cpumask_t *mask);
#define any_online_cpu(mask) 0 #define any_online_cpu(mask) 0
#endif #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_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_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) #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
......
...@@ -1761,7 +1761,7 @@ translate_compat_table(const char *name, ...@@ -1761,7 +1761,7 @@ translate_compat_table(const char *name,
goto free_newinfo; goto free_newinfo;
/* And one copy for every other CPU */ /* And one copy for every other CPU */
for_each_cpu(i) for_each_possible_cpu(i)
if (newinfo->entries[i] && newinfo->entries[i] != entry1) if (newinfo->entries[i] && newinfo->entries[i] != entry1)
memcpy(newinfo->entries[i], entry1, newinfo->size); memcpy(newinfo->entries[i], entry1, newinfo->size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment