All of lore.kernel.org
 help / color / mirror / Atom feed
* NR_CPUS and kernel 2.4.30 for sparc64
@ 2005-05-25 20:46 Krzysztof Helt
  2005-05-25 22:44 ` Krzysztof Helt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Helt @ 2005-05-25 20:46 UTC (permalink / raw)
  To: sparclinux

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-25 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25 20:46 NR_CPUS and kernel 2.4.30 for sparc64 Krzysztof Helt
2005-05-25 22:44 ` Krzysztof Helt
2005-05-25 23:37 ` Chris Newport
2005-05-25 23:37 ` Ben Collins

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.