diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/smp.c | 4 |
4 files changed, 7 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 24dc8117b822..771a59cbd213 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -135,9 +135,8 @@ skip: | |||
135 | #ifdef CONFIG_TAU_INT | 135 | #ifdef CONFIG_TAU_INT |
136 | if (tau_initialized){ | 136 | if (tau_initialized){ |
137 | seq_puts(p, "TAU: "); | 137 | seq_puts(p, "TAU: "); |
138 | for (j = 0; j < NR_CPUS; j++) | 138 | for_each_online_cpu(j) |
139 | if (cpu_online(j)) | 139 | seq_printf(p, "%10u ", tau_interrupts(j)); |
140 | seq_printf(p, "%10u ", tau_interrupts(j)); | ||
141 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); | 140 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); |
142 | } | 141 | } |
143 | #endif | 142 | #endif |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index be12041c0fc5..c1d62bf11f29 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -162,9 +162,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) | 162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) |
163 | unsigned long bogosum = 0; | 163 | unsigned long bogosum = 0; |
164 | int i; | 164 | int i; |
165 | for (i = 0; i < NR_CPUS; ++i) | 165 | for_each_online_cpu(i) |
166 | if (cpu_online(i)) | 166 | bogosum += loops_per_jiffy; |
167 | bogosum += loops_per_jiffy; | ||
168 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 167 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
169 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 168 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
170 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ | 169 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index db72a92943bf..dc2770df25b3 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -272,9 +272,8 @@ int __init ppc_init(void) | |||
272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
273 | 273 | ||
274 | /* register CPU devices */ | 274 | /* register CPU devices */ |
275 | for (i = 0; i < NR_CPUS; i++) | 275 | for_each_cpu(i) |
276 | if (cpu_possible(i)) | 276 | register_cpu(&cpu_devices[i], i, NULL); |
277 | register_cpu(&cpu_devices[i], i, NULL); | ||
278 | 277 | ||
279 | /* call platform init */ | 278 | /* call platform init */ |
280 | if (ppc_md.init != NULL) { | 279 | if (ppc_md.init != NULL) { |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 6d64a9bf3474..1065d87fc279 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -191,9 +191,7 @@ static void smp_psurge_message_pass(int target, int msg) | |||
191 | if (num_online_cpus() < 2) | 191 | if (num_online_cpus() < 2) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | for (i = 0; i < NR_CPUS; i++) { | 194 | for_each_online_cpu(i) { |
195 | if (!cpu_online(i)) | ||
196 | continue; | ||
197 | if (target == MSG_ALL | 195 | if (target == MSG_ALL |
198 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) | 196 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) |
199 | || target == i) { | 197 | || target == i) { |