diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 30 |
2 files changed, 13 insertions, 21 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 8c93ba655b33..e505a4125e35 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -117,9 +117,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
117 | #ifndef CONFIG_SMP | 117 | #ifndef CONFIG_SMP |
118 | seq_printf(p, "%10u ", kstat_irqs(i)); | 118 | seq_printf(p, "%10u ", kstat_irqs(i)); |
119 | #else | 119 | #else |
120 | for (j = 0; j < NR_CPUS; j++) { | 120 | for_each_online_cpu(j) { |
121 | if (!cpu_online(j)) | ||
122 | continue; | ||
123 | seq_printf(p, "%10u ", | 121 | seq_printf(p, "%10u ", |
124 | kstat_cpu(j).irqs[i]); | 122 | kstat_cpu(j).irqs[i]); |
125 | } | 123 | } |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 373a701c90a5..1b6e2ade1008 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -57,25 +57,21 @@ void smp_info(struct seq_file *m) | |||
57 | int i; | 57 | int i; |
58 | 58 | ||
59 | seq_printf(m, "State:\n"); | 59 | seq_printf(m, "State:\n"); |
60 | for (i = 0; i < NR_CPUS; i++) { | 60 | for_each_online_cpu(i) |
61 | if (cpu_online(i)) | 61 | seq_printf(m, "CPU%d:\t\tonline\n", i); |
62 | seq_printf(m, | ||
63 | "CPU%d:\t\tonline\n", i); | ||
64 | } | ||
65 | } | 62 | } |
66 | 63 | ||
67 | void smp_bogo(struct seq_file *m) | 64 | void smp_bogo(struct seq_file *m) |
68 | { | 65 | { |
69 | int i; | 66 | int i; |
70 | 67 | ||
71 | for (i = 0; i < NR_CPUS; i++) | 68 | for_each_online_cpu(i) |
72 | if (cpu_online(i)) | 69 | seq_printf(m, |
73 | seq_printf(m, | 70 | "Cpu%dBogo\t: %lu.%02lu\n" |
74 | "Cpu%dBogo\t: %lu.%02lu\n" | 71 | "Cpu%dClkTck\t: %016lx\n", |
75 | "Cpu%dClkTck\t: %016lx\n", | 72 | i, cpu_data(i).udelay_val / (500000/HZ), |
76 | i, cpu_data(i).udelay_val / (500000/HZ), | 73 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, |
77 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, | 74 | i, cpu_data(i).clock_tick); |
78 | i, cpu_data(i).clock_tick); | ||
79 | } | 75 | } |
80 | 76 | ||
81 | void __init smp_store_cpu_info(int id) | 77 | void __init smp_store_cpu_info(int id) |
@@ -1282,7 +1278,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1282 | return -EINVAL; | 1278 | return -EINVAL; |
1283 | 1279 | ||
1284 | spin_lock_irqsave(&prof_setup_lock, flags); | 1280 | spin_lock_irqsave(&prof_setup_lock, flags); |
1285 | for (i = 0; i < NR_CPUS; i++) | 1281 | for_each_cpu(i) |
1286 | prof_multiplier(i) = multiplier; | 1282 | prof_multiplier(i) = multiplier; |
1287 | current_tick_offset = (timer_tick_offset / multiplier); | 1283 | current_tick_offset = (timer_tick_offset / multiplier); |
1288 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 1284 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -1384,10 +1380,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
1384 | unsigned long bogosum = 0; | 1380 | unsigned long bogosum = 0; |
1385 | int i; | 1381 | int i; |
1386 | 1382 | ||
1387 | for (i = 0; i < NR_CPUS; i++) { | 1383 | for_each_online_cpu(i) |
1388 | if (cpu_online(i)) | 1384 | bogosum += cpu_data(i).udelay_val; |
1389 | bogosum += cpu_data(i).udelay_val; | ||
1390 | } | ||
1391 | printk("Total of %ld processors activated " | 1385 | printk("Total of %ld processors activated " |
1392 | "(%lu.%02lu BogoMIPS).\n", | 1386 | "(%lu.%02lu BogoMIPS).\n", |
1393 | (long) num_online_cpus(), | 1387 | (long) num_online_cpus(), |