1616#include <asm/watch.h>
1717#include <asm/dsp.h>
1818#include <asm/cop2.h>
19- #include <asm/msa .h>
19+ #include <asm/fpu .h>
2020
2121struct task_struct ;
2222
23- enum {
24- FP_SAVE_NONE = 0 ,
25- FP_SAVE_VECTOR = -1 ,
26- FP_SAVE_SCALAR = 1 ,
27- };
28-
2923/**
3024 * resume - resume execution of a task
3125 * @prev: The task previously executed.
3226 * @next: The task to begin executing.
3327 * @next_ti: task_thread_info(next).
34- * @fp_save: Which, if any, FP context to save for prev.
3528 *
3629 * This function is used whilst scheduling to save the context of prev & load
3730 * the context of next. Returns prev.
3831 */
3932extern asmlinkage struct task_struct * resume (struct task_struct * prev ,
40- struct task_struct * next , struct thread_info * next_ti ,
41- s32 fp_save );
33+ struct task_struct * next , struct thread_info * next_ti );
4234
4335extern unsigned int ll_bit ;
4436extern struct task_struct * ll_task ;
@@ -91,8 +83,8 @@ do { if (cpu_has_rw_llb) { \
9183 */
9284#define switch_to (prev , next , last ) \
9385do { \
94- s32 __fpsave = FP_SAVE_NONE; \
9586 __mips_mt_fpaff_switch_to(prev); \
87+ lose_fpu_inatomic(1, prev); \
9688 if (cpu_has_dsp) { \
9789 __save_dsp(prev); \
9890 __restore_dsp(next); \
@@ -111,15 +103,10 @@ do { \
111103 clear_c0_status(ST0_CU2); \
112104 } \
113105 __clear_software_ll_bit(); \
114- if (test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU)) \
115- __fpsave = FP_SAVE_SCALAR; \
116- if (test_and_clear_tsk_thread_flag(prev, TIF_USEDMSA)) \
117- __fpsave = FP_SAVE_VECTOR; \
118106 if (cpu_has_userlocal) \
119107 write_c0_userlocal(task_thread_info(next)->tp_value); \
120108 __restore_watch(); \
121- disable_msa(); \
122- (last) = resume(prev, next, task_thread_info(next), __fpsave); \
109+ (last) = resume(prev, next, task_thread_info(next)); \
123110} while (0)
124111
125112#endif /* _ASM_SWITCH_TO_H */
0 commit comments