瀏覽代碼

parisc: correctly display number of active CPUs

In case we fail to power up other CPUs in a SMP system, the kernel
currently shows a wrong number of online CPUs. This change makes the
output more verbose on how many of the CPUs are online. Example:

CPU(s): 1 out of 2 PA8800 (Mako) at 900.000000 MHz online.

Signed-off-by: Helge Deller <deller@gmx.de>
Helge Deller 11 年之前
父節點
當前提交
3a7452b444
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      arch/parisc/kernel/setup.c

+ 6 - 2
arch/parisc/kernel/setup.c

@@ -318,8 +318,12 @@ static int __init parisc_init(void)
 	pdc_stable_write(0x40, &osid, sizeof(osid));
 	pdc_stable_write(0x40, &osid, sizeof(osid));
 	
 	
 	processor_init();
 	processor_init();
-	printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n",
-			num_present_cpus(),
+#ifdef CONFIG_SMP
+	pr_info("CPU(s): %d out of %d %s at %d.%06d MHz online\n",
+		num_online_cpus(), num_present_cpus(),
+#else
+	pr_info("CPU(s): 1 x %s at %d.%06d MHz\n",
+#endif
 			boot_cpu_data.cpu_name,
 			boot_cpu_data.cpu_name,
 			boot_cpu_data.cpu_hz / 1000000,
 			boot_cpu_data.cpu_hz / 1000000,
 			boot_cpu_data.cpu_hz % 1000000	);
 			boot_cpu_data.cpu_hz % 1000000	);