Go to the documentation of this file.
12 #ifndef _ASM_SWITCH_TO_H
13 #define _ASM_SWITCH_TO_H
15 #include <asm/cpu-features.h>
27 extern unsigned int ll_bit;
30 #ifdef CONFIG_MIPS_MT_FPAFF
44 #define __mips_mt_fpaff_switch_to(prev) \
46 struct thread_info *__prev_ti = task_thread_info(prev); \
49 test_ti_thread_flag(__prev_ti, TIF_FPUBOUND) && \
50 (!(KSTK_STATUS(prev) & ST0_CU1))) { \
51 clear_ti_thread_flag(__prev_ti, TIF_FPUBOUND); \
52 prev->cpus_allowed = prev->thread.user_cpus_allowed; \
54 next->thread.emulated_fp = 0; \
58 #define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0)
61 #define __clear_software_ll_bit() \
63 if (!__builtin_constant_p(cpu_has_llsc) || !cpu_has_llsc) \
67 #define switch_to(prev, next, last) \
70 __mips_mt_fpaff_switch_to(prev); \
73 __clear_software_ll_bit(); \
74 __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \
75 (last) = resume(prev, next, task_thread_info(next), __usedfpu); \
78 #define finish_arch_switch(prev) \
81 __restore_dsp(current); \
82 if (cpu_has_userlocal) \
83 write_c0_userlocal(current_thread_info()->tp_value); \