Hello.

Just as the topic says, do you think this patch is good enough, or gets
even close to it?  I have tested the patch, and it seems to do it's job
in the right way.  Some might call it hackery, but it's better than
nothing I would suppose.

  Before:

    FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
     cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
     cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000

    ... Launch AP CPUs etc ... 

  After:
boot-prompt> set machdep.smp_cpus=0
boot-prompt> boot -sv

    FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs
     cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000

Patch attached with mail.
Cheers.

P.S. One more question, there are some extern variables in the
i386/include/smp.h header file, and I don't think they are used
anywhere in an extern way... can comment on patch available at the
following location:

        http://www.unixdaemons.com/~hiten/work/diffs/eremove.patch

-- 
Hiten Pandya ([EMAIL PROTECTED], [EMAIL PROTECTED])
http://www.unixdaemons.com/~hiten/
Index: sys/i386/i386/mp_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v
retrieving revision 1.203
diff -u -r1.203 mp_machdep.c
--- sys/i386/i386/mp_machdep.c  24 Feb 2003 14:36:03 -0000      1.203
+++ sys/i386/i386/mp_machdep.c  2 Mar 2003 01:25:10 -0000
@@ -278,6 +278,9 @@
 int     io_num_to_apic_id[NAPICID];
 int     apic_id_to_logical[NAPICID];
 
+TUNABLE_INT("machdep.smp_cpus", (int *)&mp_naps);
+SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD,
+    &mp_naps, 1, "Number of Application processors in use.");
 
 /* AP uses this during bootstrap.  Do not staticize.  */
 char *bootSTK;

Reply via email to