summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-01-06 21:15:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-01-06 21:15:59 +0000
commit11ecd7ad32fa356cd2ef62e41eec3b5717e78ffe (patch)
treebc7fd068a6026ba4f9411675db90c733d9889382 /sys
parent2ab6eed76d7dfc8b6e54e38f8dfc2163c97b4f0d (diff)
Enclose some SUN4-specific code within preprocessor directives, this lets SUN4C
kernel compile again.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/trap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index a7b059b80a7..f9790fb4c2b 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.52 2007/05/08 07:23:18 art Exp $ */
+/* $OpenBSD: trap.c,v 1.53 2008/01/06 21:15:58 miod Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -657,7 +657,9 @@ mem_access_fault(type, ser, v, pc, psr, tf)
ftype = ser & SER_WRITE ? VM_PROT_WRITE : VM_PROT_READ;
va = trunc_page(v);
if (psr & PSR_PS) {
+#if defined(SUN4)
extern char Lfsbail[];
+#endif
if (type == T_TEXTFAULT) {
(void) splhigh();
printf("text fault: pc=0x%x ser=%b\n", pc,
@@ -665,12 +667,14 @@ mem_access_fault(type, ser, v, pc, psr, tf)
panic("kernel fault");
/* NOTREACHED */
}
+#if defined(SUN4)
/*
* If this was an access that we shouldn't try to page in,
* resume at the fault handler without any action.
*/
if (p->p_addr && p->p_addr->u_pcb.pcb_onfault == Lfsbail)
goto kfault;
+#endif
/*
* During autoconfiguration, faults are never OK unless