diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2003-12-23 13:54:16 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2003-12-23 13:54:16 +0000 |
commit | 1805ed077220a9f9bd95ca6821885f685a119f18 (patch) | |
tree | 6f5a85bc79edadbccf373dcd98a260e186adbd4d /sys/kern/subr_smp.c | |
parent | 78e2d2bd28a40656423cb5e688038e0c36049d9d (diff) | |
download | src-1805ed077220a9f9bd95ca6821885f685a119f18.tar.gz src-1805ed077220a9f9bd95ca6821885f685a119f18.zip |
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.
Notes
Notes:
svn path=/head/; revision=123766
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r-- | sys/kern/subr_smp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index b3b81acda63a..019273168085 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"); |