Date: Wed, 04 Dec 1996 09:09:26 -0800 From: Erich Boleyn <erich@uruk.org> To: Peter Wemm <peter@spinner.dialix.com> Cc: smp@freebsd.org Subject: Re: Greater than 2 CPUs... problem with my diff Message-ID: <E0vVKp4-0002DV-00@uruk.org> In-Reply-To: Your message of "Thu, 05 Dec 1996 00:56:05 %2B0800." <199612041656.AAA00583@spinner.DIALix.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm <peter@spinner.DIALix.COM> writes: > Erich Boleyn wrote: ... > Umm, where is 'x' initialised? it's very hard to see exactly what you're > trying to do, a context diff would be a lot better... Wow, you're right. I can't believe I completely spaced that. I noticed it again after I sent it. I'm also surprised it worked correctly... weird. Anyway, here's a context diff where x *is* initialized: ------------------------(start diff mp_machdep.c)------------------------- --- mp_machdep.c Tue Dec 3 19:06:09 1996 +++ /usr/src/sys/i386/i386/mp_machdep.c Wed Dec 4 09:05:34 1996 @@ -764,7 +764,7 @@ static void processorEntry( ProcEntry entry, int* cpu ) { - int x; + int x = *cpu; /* check for usability */ if ( !(entry->cpuFlags & PROCENTRY_FLAG_EN) ) return; @@ -775,12 +775,10 @@ x = 0; bootCpuId = entry->apicID; } else { - /* 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 */ + x++; + if ( x == NCPU ) return; + *cpu = x; } CPU_TO_ID( x ) = entry->apicID; ------------------------(end diff 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?E0vVKp4-0002DV-00>