]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 11 Nov 2005 22:03:49 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 11 Nov 2005 22:03:49 +0000 (14:03 -0800)
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/smp.c

index bf1849dd9c49f5192301c9167a13a47490b0f07e..48180531562fbdd4d21559986fb4b81ef4862dc7 100644 (file)
@@ -587,6 +587,8 @@ extern void mmu_info(struct seq_file *);
 unsigned int dcache_parity_tl1_occurred;
 unsigned int icache_parity_tl1_occurred;
 
+static int ncpus_probed;
+
 static int show_cpuinfo(struct seq_file *m, void *__unused)
 {
        seq_printf(m, 
@@ -595,8 +597,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
                   "promlib\t\t: Version 3 Revision %d\n"
                   "prom\t\t: %d.%d.%d\n"
                   "type\t\t: sun4u\n"
-                  "ncpus probed\t: %ld\n"
-                  "ncpus active\t: %ld\n"
+                  "ncpus probed\t: %d\n"
+                  "ncpus active\t: %d\n"
                   "D$ parity tl1\t: %u\n"
                   "I$ parity tl1\t: %u\n"
 #ifndef CONFIG_SMP
@@ -610,8 +612,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
                   prom_prev >> 16,
                   (prom_prev >> 8) & 0xff,
                   prom_prev & 0xff,
-                  (long)num_possible_cpus(),
-                  (long)num_online_cpus(),
+                  ncpus_probed,
+                  num_online_cpus(),
                   dcache_parity_tl1_occurred,
                   icache_parity_tl1_occurred
 #ifndef CONFIG_SMP
@@ -677,6 +679,15 @@ static int __init topology_init(void)
        int i, err;
 
        err = -ENOMEM;
+
+       /* Count the number of physically present processors in
+        * the machine, even on uniprocessor, so that /proc/cpuinfo
+        * output is consistent with 2.4.x
+        */
+       ncpus_probed = 0;
+       while (!cpu_find_by_instance(ncpus_probed, NULL, NULL))
+               ncpus_probed++;
+
        for (i = 0; i < NR_CPUS; i++) {
                if (cpu_possible(i)) {
                        struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL);
index 797a65493fb848cc836ca4248171e19149f42bc3..6efc03df51c3b1b72d13b850a512178ddf9dd067 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/starfire.h>
 #include <asm/tlb.h>
 
-extern int linux_num_cpus;
 extern void calibrate_delay(void);
 
 /* Please don't make this stuff initdata!!!  --DaveM */