1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 .align 32 2 .align 32 3 .globl __flushw_user 3 .globl __flushw_user 4 .type __flushw_user,#function 4 .type __flushw_user,#function 5 __flushw_user: 5 __flushw_user: 6 rdpr %otherwin, %g1 6 rdpr %otherwin, %g1 7 brz,pn %g1, 2f 7 brz,pn %g1, 2f 8 clr %g2 8 clr %g2 9 1: save %sp, -128, %sp 9 1: save %sp, -128, %sp 10 rdpr %otherwin, %g1 10 rdpr %otherwin, %g1 11 brnz,pt %g1, 1b 11 brnz,pt %g1, 1b 12 add %g2, 1, %g2 12 add %g2, 1, %g2 13 1: sub %g2, 1, %g2 13 1: sub %g2, 1, %g2 14 brnz,pt %g2, 1b 14 brnz,pt %g2, 1b 15 restore %g0, %g0, %g0 15 restore %g0, %g0, %g0 16 2: retl 16 2: retl 17 nop 17 nop 18 .size __flushw_user,.-__flushw_user 18 .size __flushw_user,.-__flushw_user 19 EXPORT_SYMBOL(__flushw_user) 19 EXPORT_SYMBOL(__flushw_user) 20 20 21 /* Flush %fp and %i7 to the stack for 21 /* Flush %fp and %i7 to the stack for all register 22 * windows active inside of the cpu. 22 * windows active inside of the cpu. This allows 23 * show_stack_trace() to avoid using a 23 * show_stack_trace() to avoid using an expensive 24 * 'flushw'. 24 * 'flushw'. 25 */ 25 */ 26 .globl stack_trace_flush 26 .globl stack_trace_flush 27 .type stack_trace_flush,#fun 27 .type stack_trace_flush,#function 28 stack_trace_flush: 28 stack_trace_flush: 29 rdpr %pstate, %o0 29 rdpr %pstate, %o0 30 wrpr %o0, PSTATE_IE, %pstat 30 wrpr %o0, PSTATE_IE, %pstate 31 31 32 rdpr %cwp, %g1 32 rdpr %cwp, %g1 33 rdpr %canrestore, %g2 33 rdpr %canrestore, %g2 34 sub %g1, 1, %g3 34 sub %g1, 1, %g3 35 35 36 1: brz,pn %g2, 2f 36 1: brz,pn %g2, 2f 37 sub %g2, 1, %g2 37 sub %g2, 1, %g2 38 wrpr %g3, %cwp 38 wrpr %g3, %cwp 39 stx %fp, [%sp + STACK_BIAS 39 stx %fp, [%sp + STACK_BIAS + RW_V9_I6] 40 stx %i7, [%sp + STACK_BIAS 40 stx %i7, [%sp + STACK_BIAS + RW_V9_I7] 41 ba,pt %xcc, 1b 41 ba,pt %xcc, 1b 42 sub %g3, 1, %g3 42 sub %g3, 1, %g3 43 43 44 2: wrpr %g1, %cwp 44 2: wrpr %g1, %cwp 45 wrpr %o0, %pstate 45 wrpr %o0, %pstate 46 46 47 retl 47 retl 48 nop 48 nop 49 .size stack_trace_flush,.-st 49 .size stack_trace_flush,.-stack_trace_flush 50 50 51 #ifdef CONFIG_SMP 51 #ifdef CONFIG_SMP 52 .globl hard_smp_processor_id 52 .globl hard_smp_processor_id 53 .type hard_smp_processor_id, 53 .type hard_smp_processor_id,#function 54 hard_smp_processor_id: 54 hard_smp_processor_id: 55 #endif 55 #endif 56 .globl real_hard_smp_processo 56 .globl real_hard_smp_processor_id 57 .type real_hard_smp_processo 57 .type real_hard_smp_processor_id,#function 58 real_hard_smp_processor_id: 58 real_hard_smp_processor_id: 59 __GET_CPUID(%o0) 59 __GET_CPUID(%o0) 60 retl 60 retl 61 nop 61 nop 62 #ifdef CONFIG_SMP 62 #ifdef CONFIG_SMP 63 .size hard_smp_processor_id, 63 .size hard_smp_processor_id,.-hard_smp_processor_id 64 #endif 64 #endif 65 .size real_hard_smp_processo 65 .size real_hard_smp_processor_id,.-real_hard_smp_processor_id 66 EXPORT_SYMBOL_GPL(real_hard_smp_processor_id) 66 EXPORT_SYMBOL_GPL(real_hard_smp_processor_id)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.