summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-06-22 16:04:22 +0000
committerpeter <peter@FreeBSD.org>1997-06-22 16:04:22 +0000
commit2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb (patch)
tree281c7f0e4899a210947f7dfa14231536350272d2 /sys/kern/kern_shutdown.c
parente0245a10b266a1abf80916d730d18966653de374 (diff)
downloadFreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.zip
FreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.tar.gz
Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()]) There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty. This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished. Reviewed by: fsmp, dyson
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index c7cebca..1353dbf 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_shutdown.c,v 1.15 1997/05/24 18:35:44 fsmp Exp $
+ * $Id: kern_shutdown.c,v 1.16 1997/06/15 02:03:03 wollman Exp $
*/
#include "opt_ddb.h"
@@ -61,6 +61,9 @@
#include <machine/clock.h>
#include <machine/cons.h>
#include <machine/md_var.h>
+#ifdef SMP
+#include <machine/smp.h> /* smp_active, cpuid */
+#endif
#include <sys/utsname.h>
#include <sys/signalvar.h>
@@ -175,8 +178,8 @@ boot(howto)
spins = 100;
- printf("boot() called on cpu#%d\n", cpunumber());
- while ((c = cpunumber()) != 0) {
+ printf("boot() called on cpu#%d\n", cpuid);
+ while ((c = cpuid) != 0) {
if (spins-- < 1) {
printf("timeout waiting for cpu #0!\n");
break;
@@ -383,7 +386,7 @@ panic(const char *fmt, ...)
va_end(ap);
printf("\n");
#ifdef SMP
- printf(" cpu#%d\n", cpunumber());
+ printf(" cpuid %d\n", cpuid);
#endif
#if defined(DDB)
OpenPOWER on IntegriCloud