Re: [PATCH] CONFIG_NR_CPUS, redux

From: Rob Radez (rob@osinvestor.com)
Date: Tue Jun 11 2002 - 15:10:59 EST


On Tue, Jun 11, 2002 at 10:52:16AM -0700, Robert Love wrote:
> Andrew has pointed out some architectures may need minor tweaks to work
> with NR_CPUS < 32. He discovered and fixed a minor issue on i386...
> other architectures, please verify non-standard options work. Also make

On sparc, setting NR_CPUS to anything other than 32 with CONFIG_SMP set
breaks. Simple, stupid patch is attached, but there's a more elegant fix to
the actual functions abusing NR_CPUS that just seems much nicer ;-).

And yes, I know, sparc on 2.5 is badly broken, but this just might help keep
the broken-ness down a little bit.

Regards,
Rob Radez

diff -Nru a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h
--- a/include/asm-sparc/smp.h Tue Jun 11 16:09:48 2002
+++ b/include/asm-sparc/smp.h Tue Jun 11 16:09:48 2002
@@ -31,7 +31,7 @@
 #include <asm/ptrace.h>
 #include <asm/asi.h>
 
-extern struct prom_cpuinfo linux_cpus[NR_CPUS];
+extern struct prom_cpuinfo linux_cpus[32];
 
 /* Per processor Sparc parameters we need. */
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:23 EST