瀏覽代碼

sparc64: Sync FPU state in VIS emulation handler.

Copy the FPU state to the task's thread_info->fpregs for the VIS emulation
functions to access.

Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hong H. Pham 16 年之前
父節點
當前提交
410d2c8187
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      arch/sparc64/kernel/visemul.c

+ 2 - 0
arch/sparc64/kernel/visemul.c

@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
 	if (get_user(insn, (u32 __user *) pc))
 	if (get_user(insn, (u32 __user *) pc))
 		return -EFAULT;
 		return -EFAULT;
 
 
+	save_and_clear_fpu();
+
 	opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
 	opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
 	switch (opf) {
 	switch (opf) {
 	default:
 	default: