aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-24 01:52:13 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-24 02:32:20 -0400
commit8243e40acb087fcd9e7609333f0b0551391f49fc (patch)
tree1995a0617f0b5e861fa9716f0fe67ade561376d6 /arch/sparc64/kernel
parentdb9a7fb12c8d05104e8a541003593d62a42ade8f (diff)
[SPARC64]: Store magic cookie and trap type in pt_regs.
This sets us up for several simplifications and facilities: 1) The magic cookie lets us identify trap frames more accurately in stack backtraces. 2) The trap type lets us simplify all of the "are we in a syscall" state management and checks. 3) We can now see if a task off the cpu is sleeping in a system call or not. In fact, we can see what trap it is sleeping in whatever the type. The utrace guys will use this. Based upon some discussions with Roland McGrath. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/etrap.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index 4b2bf9eb447a..b49d3b60bc0c 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -53,7 +53,11 @@ etrap_irq:
53 stx %g3, [%g2 + STACKFRAME_SZ + PT_V9_TPC] 53 stx %g3, [%g2 + STACKFRAME_SZ + PT_V9_TPC]
54 rd %y, %g3 54 rd %y, %g3
55 stx %g1, [%g2 + STACKFRAME_SZ + PT_V9_TNPC] 55 stx %g1, [%g2 + STACKFRAME_SZ + PT_V9_TNPC]
56 rdpr %tt, %g1
56 st %g3, [%g2 + STACKFRAME_SZ + PT_V9_Y] 57 st %g3, [%g2 + STACKFRAME_SZ + PT_V9_Y]
58 sethi %hi(PT_REGS_MAGIC), %g3
59 or %g3, %g1, %g1
60 st %g1, [%g2 + STACKFRAME_SZ + PT_V9_MAGIC]
57 61
58 rdpr %cansave, %g1 62 rdpr %cansave, %g1
59 brnz,pt %g1, etrap_save 63 brnz,pt %g1, etrap_save