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