patch-2.3.99-pre4 linux/arch/sparc64/kernel/winfixup.S
Next file: linux/arch/sparc64/lib/Makefile
Previous file: linux/arch/sparc64/kernel/sys_sunos32.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
Mon Mar 27 10:35:56 2000
- Orig file:
v2.3.99-pre3/linux/arch/sparc64/kernel/winfixup.S
- Orig date:
Mon Aug 2 22:07:16 1999
diff -u --recursive --new-file v2.3.99-pre3/linux/arch/sparc64/kernel/winfixup.S linux/arch/sparc64/kernel/winfixup.S
@@ -1,4 +1,4 @@
-/* $Id: winfixup.S,v 1.28 1999/07/30 09:35:34 davem Exp $
+/* $Id: winfixup.S,v 1.29 2000/03/26 09:13:48 davem Exp $
*
* winfixup.S: Handle cases where user stack pointer is found to be bogus.
*
@@ -31,7 +31,7 @@
fill_fixup:
rdpr %tstate, %g1
andcc %g1, TSTATE_PRIV, %g0
- clr %g4
+ or %g4, FAULT_CODE_WINFIXUP, %g4
be,pt %xcc, window_scheisse_from_user_common
and %g1, TSTATE_CWP, %g1
@@ -69,21 +69,20 @@
mov %g6, %o7 ! Get current.
andn %l1, PSTATE_MM, %l1 ! We want to be in RMO
- srlx %g5, PAGE_SHIFT, %o1 ! Fault address
+ stb %g4, [%g6 + AOFF_task_thread + AOFF_thread_fault_code]
+ stx %g5, [%g6 + AOFF_task_thread + AOFF_thread_fault_address]
wrpr %g0, 0x0, %tl ! Out of trap levels.
wrpr %l1, (PSTATE_IE | PSTATE_AG | PSTATE_RMO), %pstate
sethi %uhi(PAGE_OFFSET), %g4 ! Prepare page_offset global reg
mov %o7, %g6
sllx %g4, 32, %g4 ! and finish it...
- clr %o2
/* This is the same as below, except we handle this a bit special
* since we must preserve %l5 and %l6, see comment above.
*/
- sllx %o1, PAGE_SHIFT, %o1
call do_sparc64_fault
add %sp, STACK_BIAS + REGWIN_SZ, %o0
- b,pt %xcc, rtrap
+ ba,pt %xcc, rtrap
nop ! yes, nop is correct
/* Be very careful about usage of the alternate globals here.
@@ -149,22 +148,19 @@
andcc %g1, TSTATE_PRIV, %g0
saved
and %g1, TSTATE_CWP, %g1
- be,a,pn %xcc, window_scheisse_from_user_common
- or %g4, 0x4, %g4 ! we know it was a write
+ be,pn %xcc, window_scheisse_from_user_common
+ mov FAULT_CODE_WRITE | FAULT_CODE_DTLB | FAULT_CODE_WINFIXUP, %g4
retry
+
window_scheisse_from_user_common:
+ stb %g4, [%g6 + AOFF_task_thread + AOFF_thread_fault_code]
+ stx %g5, [%g6 + AOFF_task_thread + AOFF_thread_fault_address]
wrpr %g1, %cwp
- sethi %hi(109f), %g7
ba,pt %xcc, etrap
-109: or %g7, %lo(109b), %g7
- srlx %l5, PAGE_SHIFT, %o1
-
- and %l4, 0x4, %o2
- sllx %o1, PAGE_SHIFT, %o1
+ rd %pc, %g7
call do_sparc64_fault
add %sp, STACK_BIAS + REGWIN_SZ, %o0
- ba,pt %xcc, rtrap
- clr %l6
+ ba,a,pt %xcc, rtrap_clr_l6
.globl winfix_mna, fill_fixup_mna, spill_fixup_mna
winfix_mna:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)