From: William Lee Irwin III <wli@holomorphy.com>
To: David Howells <dhowells@redhat.com>, linux-kernel@vger.kernel.org
Cc: akpm@digeo.com
Subject: Re: 2.5 kernels fail to start second CPU
Date: Thu, 15 May 2003 03:11:03 -0700 [thread overview]
Message-ID: <20030515101103.GP8978@holomorphy.com> (raw)
In-Reply-To: <20030515094834.GO8978@holomorphy.com>
On Thu, May 15, 2003 at 02:48:34AM -0700, William Lee Irwin III wrote:
> Sparse physical APIC ID's are not handled properly. This should correct
> them.
I forgot to count the BSP in the initial count of the number of kicked
cpus. This patch does it correctly.
To handle sparse physical APIC ID's properly the phys_cpu_present_map
must be scanned beyond bit NR_CPUS while ensuring no more than NR_CPUS
are woken in order not to attempt to wake non-addressible cpus.
The following patch adds that logic to smp_boot_cpus() and corrects the
failure to wake secondaries reported by dhowells, with successful
wakeup, runtime, reboot, and halting reported after it was applied.
-- wli
diff -prauN linux-2.5.69-1/arch/i386/kernel/smpboot.c dhowells-2.5.69-1/arch/i386/kernel/smpboot.c
--- linux-2.5.69-1/arch/i386/kernel/smpboot.c Mon May 12 11:09:21 2003
+++ dhowells-2.5.69-1/arch/i386/kernel/smpboot.c Thu May 15 02:46:59 2003
@@ -935,7 +935,7 @@
static void __init smp_boot_cpus(unsigned int max_cpus)
{
- int apicid, cpu, bit;
+ int apicid, cpu, bit, kicked;
/*
* Setup boot CPU information
@@ -1018,7 +1018,8 @@
*/
Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
- for (bit = 0; bit < NR_CPUS; bit++) {
+ kicked = 1;
+ for (bit = 0; kicked < NR_CPUS && bit < BITS_PER_LONG; bit++) {
apicid = cpu_present_to_apicid(bit);
/*
* Don't even attempt to start the boot CPU!
@@ -1034,6 +1035,8 @@
if (do_boot_cpu(apicid))
printk("CPU #%d not responding - cannot use it.\n",
apicid);
+ else
+ ++kicked;
}
/*
next prev parent reply other threads:[~2003-05-15 9:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 8:57 2.5 kernels fail to start second CPU David Howells
2003-05-15 9:25 ` David Howells
2003-05-15 9:48 ` William Lee Irwin III
2003-05-15 10:11 ` William Lee Irwin III [this message]
2003-05-15 18:21 ` Bill Davidsen
2003-05-15 18:44 ` William Lee Irwin III
2003-05-15 19:26 ` Bill Davidsen
2003-05-15 20:26 ` William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030515101103.GP8978@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@digeo.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.