summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/trap.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/amd64/amd64/trap.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/amd64/amd64/trap.c')
-rw-r--r--sys/amd64/amd64/trap.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 89dd34f..8914a5b 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.98 1997/06/02 08:19:03 dfr Exp $
+ * $Id: trap.c,v 1.99 1997/06/07 04:36:10 bde Exp $
*/
/*
@@ -87,11 +87,7 @@
#include "isa.h"
#include "npx.h"
-#ifdef SMP
-extern struct i386tss *SMPcommon_tss_ptr[];
-#else
extern struct i386tss common_tss;
-#endif
int (*pmath_emulate) __P((struct trapframe *));
@@ -704,7 +700,7 @@ trap_fatal(frame)
type, trap_msg[type],
ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel");
#ifdef SMP
- printf("cpunumber = %d\n", cpunumber());
+ printf("cpuid = %d\n", cpuid);
#endif
if (type == T_PAGEFLT) {
printf("fault virtual address = 0x%x\n", eva);
@@ -790,19 +786,12 @@ trap_fatal(frame)
void
dblfault_handler()
{
-#ifdef SMP
- int x = cpunumber();
-#endif
-
printf("\nFatal double fault:\n");
-#ifdef SMP
- printf("eip = 0x%x\n", SMPcommon_tss_ptr[x]->tss_eip);
- printf("esp = 0x%x\n", SMPcommon_tss_ptr[x]->tss_esp);
- printf("ebp = 0x%x\n", SMPcommon_tss_ptr[x]->tss_ebp);
-#else
printf("eip = 0x%x\n", common_tss.tss_eip);
printf("esp = 0x%x\n", common_tss.tss_esp);
printf("ebp = 0x%x\n", common_tss.tss_ebp);
+#ifdef SMP
+ printf("cpuid = %d\n", cpuid);
#endif
panic("double fault");
}
OpenPOWER on IntegriCloud