瀏覽代碼

MIPS: MSA: bugfix - disable MSA correctly for new threads/processes.

Due to the slightly odd way that new threads and processes start execution
when scheduled for the very first time they were bypassing the required
disable_msa call.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 10 年之前
父節點
當前提交
9cc719ab3f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/mips/include/asm/switch_to.h

+ 1 - 1
arch/mips/include/asm/switch_to.h

@@ -104,7 +104,6 @@ do {									\
 	if (test_and_clear_tsk_thread_flag(prev, TIF_USEDMSA))		\
 	if (test_and_clear_tsk_thread_flag(prev, TIF_USEDMSA))		\
 		__fpsave = FP_SAVE_VECTOR;				\
 		__fpsave = FP_SAVE_VECTOR;				\
 	(last) = resume(prev, next, task_thread_info(next), __fpsave);	\
 	(last) = resume(prev, next, task_thread_info(next), __fpsave);	\
-	disable_msa();							\
 } while (0)
 } while (0)
 
 
 #define finish_arch_switch(prev)					\
 #define finish_arch_switch(prev)					\
@@ -122,6 +121,7 @@ do {									\
 	if (cpu_has_userlocal)						\
 	if (cpu_has_userlocal)						\
 		write_c0_userlocal(current_thread_info()->tp_value);	\
 		write_c0_userlocal(current_thread_info()->tp_value);	\
 	__restore_watch();						\
 	__restore_watch();						\
+	disable_msa();							\
 } while (0)
 } while (0)
 
 
 #endif /* _ASM_SWITCH_TO_H */
 #endif /* _ASM_SWITCH_TO_H */