summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2006-12-18 02:40:23 +0000
committerkmacy <kmacy@FreeBSD.org>2006-12-18 02:40:23 +0000
commitd77d3157df850828b072cae49795fbbb825204d3 (patch)
treeb52cc84c26c01ed689102e632d50e11b70d91651 /sys/sun4v
parent302aae3aab0c48c13e73a75bd5c2ddc3653c480d (diff)
downloadFreeBSD-src-d77d3157df850828b072cae49795fbbb825204d3.zip
FreeBSD-src-d77d3157df850828b072cae49795fbbb825204d3.tar.gz
push trap conversion up into tl1_trap to further simplify spill / fill fault
handling
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/sun4v/exception.S6
-rw-r--r--sys/sun4v/sun4v/wbuf.S18
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/sun4v/sun4v/exception.S b/sys/sun4v/sun4v/exception.S
index 5115f97..46cb61f 100644
--- a/sys/sun4v/sun4v/exception.S
+++ b/sys/sun4v/sun4v/exception.S
@@ -1999,6 +1999,12 @@ ENTRY(tl1_trap)
wrpr %g0, 1, %gl
rdpr %tt, %g2
GET_MMFSA_SCRATCH(%g7)
+
+ ! convert hardware trap type to kernel trap type
+ set trap_conversion, %g1
+ sllx %g2, INT_SHIFT, %g2
+ ld [%g1 + %g2], %g2
+
wr %g0, ASI_REAL, %asi
ldxa [%g7 + MMFSA_D_ADDR]%asi, %g3
ldxa [%g7 + MMFSA_D_CTX]%asi, %g7
diff --git a/sys/sun4v/sun4v/wbuf.S b/sys/sun4v/sun4v/wbuf.S
index b4b27a1..3858e3c 100644
--- a/sys/sun4v/sun4v/wbuf.S
+++ b/sys/sun4v/sun4v/wbuf.S
@@ -37,17 +37,12 @@ ENTRY(fault_64bit_sn0)
mov 1, %g5
stx %g5, [%g4 + PCB_NSAVED]
- ! convert hardware trap type to kernel trap type
- set trap_conversion, %g1
- sllx %g2, INT_SHIFT, %g2
- ld [%g1 + %g2], %g2
-
set trap, %g1
sub %g0, 1, %g4
rdpr %tstate, %g5
and %g5, TSTATE_CWP_MASK, %g5
- ba,pt %xcc, tl0_utrap
+ ba,pt %xcc, tl0_skip_utrap
wrpr %g0, %g5, %cwp
END(fault_64bit_sn0)
@@ -156,11 +151,6 @@ fault_fn1_common:
add %g1, 4, %g1
wrpr %g0, %g1, %tnpc
- ! convert hardware trap type to kernel trap type
- set trap_conversion, %g1
- sllx %g2, INT_SHIFT, %g2
- ld [%g1 + %g2], %g2
-
set trap, %g1
mov 1, %g5
sllx %g5, CTX_OTHER_SHIFT, %g5
@@ -173,10 +163,10 @@ fault_fn1_common:
mov KCONTEXT, %g5
mov MMU_CID_P, %g6
SET_MMU_CONTEXT(%g6, %g5)
- membar #Sync
- b tl0_ktrap
- nop
+
+ ba,pt %xcc, tl0_ktrap
+ membar #Sync
END(fault_32bit_fn1)
ENTRY(fault_64bit_fn0)
OpenPOWER on IntegriCloud