aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
-rw-r--r--arch/sparc64/kernel/entry.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index 6be4d2d2904e..49eca4b1cf25 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -1705,6 +1705,36 @@ __flushw_user:
17052: retl 17052: retl
1706 nop 1706 nop
1707 1707
1708 /* Flush %fp and %i7 to the stack for all register
1709 * windows active inside of the cpu. This allows
1710 * show_stack_trace() to avoid using an expensive
1711 * 'flushw'.
1712 */
1713 .globl stack_trace_flush
1714 .type stack_trace_flush,#function
1715stack_trace_flush:
1716 rdpr %pstate, %o0
1717 wrpr %o0, PSTATE_IE, %pstate
1718
1719 rdpr %cwp, %g1
1720 rdpr %canrestore, %g2
1721 sub %g1, 1, %g3
1722
17231: brz,pn %g2, 2f
1724 sub %g2, 1, %g2
1725 wrpr %g3, %cwp
1726 stx %fp, [%sp + STACK_BIAS + RW_V9_I6]
1727 stx %i7, [%sp + STACK_BIAS + RW_V9_I7]
1728 ba,pt %xcc, 1b
1729 sub %g3, 1, %g3
1730
17312: wrpr %g1, %cwp
1732 wrpr %o0, %pstate
1733
1734 retl
1735 nop
1736 .size stack_trace_flush,.-stack_trace_flush
1737
1708#ifdef CONFIG_SMP 1738#ifdef CONFIG_SMP
1709 .globl hard_smp_processor_id 1739 .globl hard_smp_processor_id
1710hard_smp_processor_id: 1740hard_smp_processor_id: