3 .type __flushw_user,#function
17 .size __flushw_user,.-__flushw_user
19 /* Flush %fp and %i7 to the stack for all register
20 * windows active inside of the cpu. This allows
21 * show_stack_trace() to avoid using an expensive
24 .globl stack_trace_flush
25 .type stack_trace_flush,#function
28 wrpr %o0, PSTATE_IE, %pstate
37 stx %fp, [%sp + STACK_BIAS + RW_V9_I6]
38 stx %i7, [%sp + STACK_BIAS + RW_V9_I7]
47 .size stack_trace_flush,.-stack_trace_flush
49 #ifdef CONFIG_PERF_EVENTS
50 .globl perf_arch_fetch_caller_regs
51 .type perf_arch_fetch_caller_regs,#function
52 perf_arch_fetch_caller_regs:
53 /* We always read the %pstate into %o5 since we will use
54 * that to construct a fake %tstate to store into the regs.
60 /* Turn off interrupts while we walk around the register
63 wrpr %o5, PSTATE_IE, %pstate
65 /* The %canrestore tells us how many register windows are
66 * still live in the chip above us, past that we have to
67 * walk the frame as saved on the stack. We stash away
68 * the %cwp in %g1 so we can return back to the original
75 /* We have the skip count in %g7, if it hits zero then
76 * %fp/%i7 are the registers we need. Otherwise if our
77 * %canrestore count maintained in %g2 hits zero we have
78 * to start traversing the stack.
87 /* We found the values we need in the cpu's register
98 /* We hit the end of the valid register windows in the
99 * cpu, start traversing the stack frame.
103 20: ldx [%g3 + STACK_BIAS + RW_V9_I7], %g2
106 ldx [%g3 + STACK_BIAS + RW_V9_I6], %g3
108 /* Restore the current register window position and
109 * re-enable interrupts.
114 2: stx %g3, [%o0 + PT_V9_FP]
116 stx %o5, [%o0 + PT_V9_TSTATE]
117 stx %g2, [%o0 + PT_V9_TPC]
120 stx %g2, [%o0 + PT_V9_TNPC]
121 .size perf_arch_fetch_caller_regs,.-perf_arch_fetch_caller_regs
122 #endif /* CONFIG_PERF_EVENTS */
125 .globl hard_smp_processor_id
126 .type hard_smp_processor_id,#function
127 hard_smp_processor_id:
129 .globl real_hard_smp_processor_id
130 .type real_hard_smp_processor_id,#function
131 real_hard_smp_processor_id:
136 .size hard_smp_processor_id,.-hard_smp_processor_id
138 .size real_hard_smp_processor_id,.-real_hard_smp_processor_id