summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-12-23 13:54:16 +0000
committeralfred <alfred@FreeBSD.org>2003-12-23 13:54:16 +0000
commita121c1dfef4ce13140b77ccd7844c4f0e8d1f829 (patch)
tree6f5a85bc79edadbccf373dcd98a260e186adbd4d /sys/kern/subr_smp.c
parent0b3fdbfa5200ef73e1c802d77fff9038a710bad1 (diff)
downloadFreeBSD-src-a121c1dfef4ce13140b77ccd7844c4f0e8d1f829.zip
FreeBSD-src-a121c1dfef4ce13140b77ccd7844c4f0e8d1f829.tar.gz
Introduce mp_maxcpus which can be used by libkvm utils to find out
how many CPUs the system was compiled for. Export the variable via a sysctl node 'kern.smp.maxcpus' as well.
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index b3b81ac..0192731 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -56,6 +56,8 @@ void (*cpustop_restartfunc)(void);
#endif
int mp_ncpus;
+/* export this for libkvm consumers. */
+int mp_maxcpus = MAXCPU;
volatile int smp_started;
u_int all_cpus;
@@ -63,6 +65,9 @@ u_int mp_maxid;
SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP");
+SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD, &mp_maxcpus, 0,
+ "Max number of CPUs that the system was compiled for.");
+
int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_kern_smp, OID_AUTO, active, CTLFLAG_RW, &smp_active, 0,
"Number of Auxillary Processors (APs) that were successfully started");
OpenPOWER on IntegriCloud