From owner-freebsd-smp Wed Dec 4 08:38:02 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA27468 for smp-outgoing; Wed, 4 Dec 1996 08:38:02 -0800 (PST) Received: from uruk.org (root@ns.uruk.org [198.145.95.253]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA27457 for ; Wed, 4 Dec 1996 08:37:59 -0800 (PST) Received: from uruk.org [127.0.0.1] (erich) by uruk.org with esmtp (Exim 0.53 #1) id E0vVKOc-00028j-00; Wed, 4 Dec 1996 08:42:06 -0800 To: smp@freebsd.org Subject: More than 2 CPUs Date: Wed, 04 Dec 1996 08:42:06 -0800 From: Erich Boleyn Message-Id: Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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): Mad Genius wanna-be, CyberMuffin \__ (finger me for other stats) Web: http://www.uruk.org/~erich/ Motto: "I'll live forever or die trying"