From 11ecd7ad32fa356cd2ef62e41eec3b5717e78ffe Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 6 Jan 2008 21:15:59 +0000 Subject: Enclose some SUN4-specific code within preprocessor directives, this lets SUN4C kernel compile again. --- sys/arch/sparc/sparc/trap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') 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 -- cgit v1.2.3