summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-01 16:24:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-01 16:24:18 +0000
commitfbfcc4cf531a40dae5234e59b1bccef3ef4523d1 (patch)
treec4f31324f0b0a36a152233d86121633677e814f1 /sys/arch/sparc64
parent8f515392d4093491151b69467ed8e4f588033876 (diff)
Make probeget() and related code in trap.c #ifdef DDB
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/locore.s28
-rw-r--r--sys/arch/sparc64/sparc64/trap.c8
2 files changed, 12 insertions, 24 deletions
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index b8f540187f4..0c2333addc8 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.59 2006/06/07 16:57:43 deraadt Exp $ */
+/* $OpenBSD: locore.s,v 1.60 2006/07/01 16:24:17 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -6187,25 +6187,8 @@ ENTRY(proc_trampoline)
ba,a,pt %icc, return_from_trap
nop
-Lfserr:
- stx %g0, [%o2 + PCB_ONFAULT]! error in r/w, clear pcb_onfault
- membar #StoreStore|#StoreLoad
- retl ! and return error indicator
- mov -1, %o0
-
- /*
- * This is just like Lfserr, but it's a global label that allows
- * mem_access_fault() to check to see that we don't want to try to
- * page in the fault. It's used by fuswintr() etc.
- */
- .globl _C_LABEL(Lfsbail)
-_C_LABEL(Lfsbail):
- stx %g0, [%o2 + PCB_ONFAULT]! error in r/w, clear pcb_onfault
- membar #StoreStore|#StoreLoad
- retl ! and return error indicator
- mov -1, %o0
+#ifdef DDB
-/* probeget is meant to be used during autoconfiguration */
/*
* The following probably need to be changed, but to what I don't know.
*/
@@ -6227,8 +6210,8 @@ ENTRY(probeget)
mov %o2, %o4
! %o0 = addr, %o1 = asi, %o4 = (1,2,4)
sethi %hi(CPCB), %o2
- ldx [%o2 + %lo(CPCB)], %o2 ! cpcb->pcb_onfault = Lfserr;
- set _C_LABEL(Lfsbail), %o5
+ ldx [%o2 + %lo(CPCB)], %o2 ! cpcb->pcb_onfault = Lfsprobe;
+ set _C_LABEL(Lfsprobe), %o5
stx %o5, [%o2 + PCB_ONFAULT]
or %o0, 0x9, %o3 ! if (PHYS_ASI(asi)) {
sub %o3, 0x1d, %o3
@@ -6270,6 +6253,7 @@ ENTRY(probeget)
/*
* Fault handler for probeget
*/
+ .globl _C_LABEL(Lfsprobe)
_C_LABEL(Lfsprobe):
stx %g0, [%o2 + PCB_ONFAULT]! error in r/w, clear pcb_onfault
mov -1, %o1
@@ -6278,6 +6262,8 @@ _C_LABEL(Lfsprobe):
retl ! and return error indicator
mov -1, %o0
+#endif /* DDB */
+
/*
* pmap_zero_page(pa)
*
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 676695a8c3e..6b2b67ffb50 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.42 2006/06/26 22:18:06 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.43 2006/07/01 16:24:17 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -866,13 +866,15 @@ data_access_fault(tf, type, pc, addr, sfva, sfsr)
: VM_PROT_READ;
}
if (tstate & (PSTATE_PRIV<<TSTATE_PSTATE_SHIFT)) {
- extern char Lfsbail[];
+#ifdef DDB
+ extern char Lfsprobe[];
/*
* 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)
+ if (p->p_addr && p->p_addr->u_pcb.pcb_onfault == Lfsprobe)
goto kfault;
+#endif
/*
* During autoconfiguration, faults are never OK unless