Date: Wed, 04 Dec 1996 08:42:06 -0800 From: Erich Boleyn <erich@uruk.org> To: smp@freebsd.org Subject: More than 2 CPUs Message-ID: <E0vVKOc-00028j-00@uruk.org>
next in thread | raw e-mail | index | archive | help
It strikes me that part of this more than 2 CPUs problem is sort of bogus. If you configure the kernel to only support 2 CPUs, it should just ignore any more than that, rather than causing a kernel panic. I just made a patch for "i386/i386/mp_machdep.c" which makes it ignore any more than the configured number of CPUs. I configured my kernel for 2 CPUs, and this now does the right thing. Please commit this (or something like it) to the SMP tree. When we get more than 2 CPU support, or want to test it, it is easy enough to bump the NCPU number in the config file. -------------------(start cvs diff sys/i386/i386/mp_machdep.c)--------------- Index: sys/i386/i386/mp_machdep.c =================================================================== RCS file: /usr/cvssup/sys/i386/i386/mp_machdep.c,v retrieving revision 1.28 diff -r1.28 mp_machdep.c 778,782c778,780 < /* add another AP to list */ < x = (*cpu)++; < if ( x == NCPU ) { < printf( "too many CPUs, increase 'NCPU'\n" ); < panic( "\n" ); --- > /* add another AP to list, if less than max number of CPUs */ > if ( x < (NCPU-1) ) { > x = (*cpu)++; 786,787c784,787 < CPU_TO_ID( x ) = entry->apicID; < ID_TO_CPU( entry->apicID ) = x; --- > if (x < NCPU) { > CPU_TO_ID( x ) = entry->apicID; > ID_TO_CPU( entry->apicID ) = x; > } --------------------(end cvs diff sys/i386/i386/mp_machdep.c)---------------- -- Erich Stefan Boleyn \_ E-mail (preferred): <erich@uruk.org> Mad Genius wanna-be, CyberMuffin \__ (finger me for other stats) Web: http://www.uruk.org/~erich/ Motto: "I'll live forever or die trying"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0vVKOc-00028j-00>