Re: CPU boot problem on 2.6.0-test3-bk8

From: Dave Hansen
Date: Thu Aug 21 2003 - 10:02:38 EST


On Thu, 2003-08-21 at 07:10, Andrew Theurer wrote:
> So we only loop for the actual number processors found in mpparse.c? This
> seems to work for me.

I think there's a reason it was done that way. I think your patch
breaks the visws subarch, too.

Could you mark up that loop a bit and printk a bit, so we can see which
continue you're missing?

<pasting patch lazily in email because I can't be bothered to actually copy it from the machine I"m working on>
diff -urp linux-2.6.0-test3-clean/arch/i386/kernel/smpboot.c linux-2.6.0-test3-work/arch/i386/kernel/smpboot.c
--- linux-2.6.0-test3-clean/arch/i386/kernel/smpboot.c Wed Aug 20 19:54:29 2003
+++ linux-2.6.0-test3-work/arch/i386/kernel/smpboot.c Wed Aug 20 20:19:41 2003
@@ -1020,24 +1020,30 @@ static void __init smp_boot_cpus(unsigne
Dprintk("CPU present map: %lx\n", physids_coerce(phys_cpu_present_map));

kicked = 1;
- for (bit = 0; kicked < NR_CPUS && bit < MAX_APICS; bit++) {
+ for (bit = 0; kicked < NR_CPUS && bit < MAX_APICS; bit++, kicked++) {
apicid = cpu_present_to_apicid(bit);
/*
* Don't even attempt to start the boot CPU!
*/
- if ((apicid == boot_cpu_apicid) || (apicid == BAD_APICID))
+ printk("smp_boot_cpus() bit: %d\n", bit);
+ if ((apicid == boot_cpu_apicid) || (apicid == BAD_APICID)) {
+ printk("(apicid == boot_cpu_apicid) || (apicid == BAD_APICID)\n");
+ printk("apicid: %08lx boot_cpu_apicid: %08lx BAD_APICID: %08lx\n", apicid, boot_cpu_apicid, BAD_APICID);
continue;
+ }

- if (!check_apicid_present(bit))
+ if (!check_apicid_present(bit)) {
+ printk("!check_apicid_present(bit)\n");
continue;
- if (max_cpus <= cpucount+1)
+ }
+ if (max_cpus <= cpucount+1) {
+ printk("(max_cpus <= cpucount+1)\n");
continue;
+ }

if (do_boot_cpu(apicid))
printk("CPU #%d not responding - cannot use it.\n",
apicid);
- else
- ++kicked;
}

/*
--
Dave Hansen
haveblue@xxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/