|
@@ -1705,6 +1705,36 @@ __flushw_user:
|
|
|
2: retl
|
|
|
nop
|
|
|
|
|
|
+ /* Flush %fp and %i7 to the stack for all register
|
|
|
+ * windows active inside of the cpu. This allows
|
|
|
+ * show_stack_trace() to avoid using an expensive
|
|
|
+ * 'flushw'.
|
|
|
+ */
|
|
|
+ .globl stack_trace_flush
|
|
|
+ .type stack_trace_flush,#function
|
|
|
+stack_trace_flush:
|
|
|
+ rdpr %pstate, %o0
|
|
|
+ wrpr %o0, PSTATE_IE, %pstate
|
|
|
+
|
|
|
+ rdpr %cwp, %g1
|
|
|
+ rdpr %canrestore, %g2
|
|
|
+ sub %g1, 1, %g3
|
|
|
+
|
|
|
+1: brz,pn %g2, 2f
|
|
|
+ sub %g2, 1, %g2
|
|
|
+ wrpr %g3, %cwp
|
|
|
+ stx %fp, [%sp + STACK_BIAS + RW_V9_I6]
|
|
|
+ stx %i7, [%sp + STACK_BIAS + RW_V9_I7]
|
|
|
+ ba,pt %xcc, 1b
|
|
|
+ sub %g3, 1, %g3
|
|
|
+
|
|
|
+2: wrpr %g1, %cwp
|
|
|
+ wrpr %o0, %pstate
|
|
|
+
|
|
|
+ retl
|
|
|
+ nop
|
|
|
+ .size stack_trace_flush,.-stack_trace_flush
|
|
|
+
|
|
|
#ifdef CONFIG_SMP
|
|
|
.globl hard_smp_processor_id
|
|
|
hard_smp_processor_id:
|