From: john stultz <johnstul@us.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
"Martin J. Bligh" <mbligh@aracnet.com>,
Dave H <haveblue@us.ibm.com>
Subject: [RFC] NR_CPUS=8 on a 32 cpu box
Date: 04 Sep 2003 18:27:00 -0700 [thread overview]
Message-ID: <1062725220.1307.1562.camel@cog.beaverton.ibm.com> (raw)
Andrew, All,
So, I found the cause of that memory corruption I mentioned last night.
I was booting on the 16x w/ HT and I hadn't taken note that NR_CPUS now
defaults to 8. Whoops. Ends up there isn't any bounds checking when
bringing up the cpus, thus we overflow bios_cpu_apicid[].
Here's a quick patch that checks if num_processors has hit NR_CPUS.
Seems to fix it for me.
Let me know if you have any comments or suggestions.
thanks
-john
===== arch/i386/kernel/mpparse.c 1.49 vs edited =====
--- 1.49/arch/i386/kernel/mpparse.c Sun Aug 31 16:14:25 2003
+++ edited/arch/i386/kernel/mpparse.c Thu Sep 4 18:07:15 2003
@@ -167,6 +167,10 @@
boot_cpu_logical_apicid = apicid;
}
+ if (num_processors > NR_CPUS){
+ printk(KERN_WARNING "NR_CPUS limit of %i reached. Cannot boot CPU(apicid 0x%d).\n", NR_CPUS, m->mpc_apicid);
+ return;
+ }
num_processors++;
if (MAX_APICS - m->mpc_apicid <= 0) {
next reply other threads:[~2003-09-05 1:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-05 1:27 john stultz [this message]
2003-09-05 1:47 ` Dave Hansen
2003-09-05 2:29 ` Martin J. Bligh
2003-09-05 7:51 ` Tim Schmielau
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=1062725220.1307.1562.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@digeo.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®