From: Krzysztof Helt <krzysztof.h1@wp.pl>
To: sparclinux@vger.kernel.org
Subject: NR_CPUS and kernel 2.4.30 for sparc64
Date: Wed, 25 May 2005 20:46:12 +0000 [thread overview]
Message-ID: <4294E414.80003@wp.pl> (raw)
I built a kernel 2.4.30 with SMP and number of cpus set to 2, but This
kernel actevated only one cpu. A quick look at the smp.c file
(arch/sparc64/kernel/smp.c) revealed a root of this:
In the smp_boot_cpus() function there are lines:
for (i = 0; i < NR_CPUS; i++) {
if (i = boot_cpu_id)
continue;
if ((cpucount + 1) = max_cpus)
goto ignorecpu;
...
The first condition eliminates the first cpu from the list of found ones
(I assume the first is a boot cpu). The second condition eliminates the
last cpu. So on dual smp machine if the first cpu (number 0) is the boot
cpu and NR_CPUS is set to 2 no other cpu is found.
I think the second condition and goto should be removed, but please
advice in case I do not understand something with SMP initialization.
Regards,
Krzysztof Helt
next reply other threads:[~2005-05-25 20:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 20:46 Krzysztof Helt [this message]
2005-05-25 22:44 ` NR_CPUS and kernel 2.4.30 for sparc64 Krzysztof Helt
2005-05-25 23:37 ` Chris Newport
2005-05-25 23:37 ` Ben Collins
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=4294E414.80003@wp.pl \
--to=krzysztof.h1@wp.pl \
--cc=sparclinux@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.