Make SMP x86-64 kernels boot on more UP systems.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Should someone boot an SMP kernel on UP hardware on some systems,
strange things happen, such as..

SMP: Allowing 0 CPUs.

We blow up shortly afterwards.

Signed-off-by: Dave Jones <[email protected]>

--- linux-2.6.15.noarch/arch/x86_64/kernel/smpboot.c~	2006-02-20 21:59:56.000000000 -0500
+++ linux-2.6.15.noarch/arch/x86_64/kernel/smpboot.c	2006-02-20 22:01:57.000000000 -0500
@@ -975,6 +975,11 @@ __init void prefill_possible_map(void)
 	if (possible > NR_CPUS) 
 		possible = NR_CPUS;
 
+	if (possible == 0) {	/* Could be SMP kernel on UP hw with broken BIOS */
+		possible = 1;
+		printk (KERN_DEBUG "BIOS never enumerated boot CPU, fixing.\n");
+	}
+
 	printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
 		possible,
 	        max_t(int, possible - num_processors, 0));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux