summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/tsb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-02-01 03:34:21 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 10:11:27 +0100
commit9bc657b28eba22e36efcdf3afa08100f92971eb4 (patch)
treed04a21e01a1795a6ea5be550ad96b6a4a3945375 /arch/sparc64/kernel/tsb.S
parent[SPARC64]: Kill hard-coded %pstate setting in sparc_exit. (diff)
downloadlinux-9bc657b28eba22e36efcdf3afa08100f92971eb4.tar.xz
linux-9bc657b28eba22e36efcdf3afa08100f92971eb4.zip
[SPARC64]: Fix too early reference to %g6
%g6 is not necessarily set to current_thread_info() at sparc64_realfault_common. So store the fault code and address after we invoke etrap and %g6 is properly set up. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/tsb.S')
-rw-r--r--arch/sparc64/kernel/tsb.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index c4e7740d5e82..e1dd37f5e535 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -110,10 +110,13 @@ tsb_do_itlb_fault:
.globl sparc64_realfault_common
sparc64_realfault_common:
- stb %g4, [%g6 + TI_FAULT_CODE] ! Save fault code
- stx %g5, [%g6 + TI_FAULT_ADDR] ! Save fault address
+ /* fault code in %g4, fault address in %g5, etrap will
+ * preserve these two values in %l4 and %l5 respectively
+ */
ba,pt %xcc, etrap ! Save trap state
1: rd %pc, %g7 ! ...
+ stb %l4, [%g6 + TI_FAULT_CODE] ! Save fault code
+ stx %l5, [%g6 + TI_FAULT_ADDR] ! Save fault address
call do_sparc64_fault ! Call fault handler
add %sp, PTREGS_OFF, %o0 ! Compute pt_regs arg
ba,pt %xcc, rtrap_clr_l6 ! Restore cpu state