diff options
Diffstat (limited to 'arch/ppc/kernel/setup.c')
-rw-r--r-- | arch/ppc/kernel/setup.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index c08ab432e958..53e9deacee82 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -168,9 +168,8 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
168 | /* Show summary information */ | 168 | /* Show summary information */ |
169 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
170 | unsigned long bogosum = 0; | 170 | unsigned long bogosum = 0; |
171 | for (i = 0; i < NR_CPUS; ++i) | 171 | for_each_online_cpu(i) |
172 | if (cpu_online(i)) | 172 | bogosum += cpu_data[i].loops_per_jiffy; |
173 | bogosum += cpu_data[i].loops_per_jiffy; | ||
174 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 173 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
175 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 174 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
176 | #endif /* CONFIG_SMP */ | 175 | #endif /* CONFIG_SMP */ |
@@ -712,9 +711,8 @@ int __init ppc_init(void) | |||
712 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 711 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
713 | 712 | ||
714 | /* register CPU devices */ | 713 | /* register CPU devices */ |
715 | for (i = 0; i < NR_CPUS; i++) | 714 | for_each_cpu(i) |
716 | if (cpu_possible(i)) | 715 | register_cpu(&cpu_devices[i], i, NULL); |
717 | register_cpu(&cpu_devices[i], i, NULL); | ||
718 | 716 | ||
719 | /* call platform init */ | 717 | /* call platform init */ |
720 | if (ppc_md.init != NULL) { | 718 | if (ppc_md.init != NULL) { |