From: Hong H. Pham Date: Thu, 4 Dec 2008 17:12:57 +0000 (-0800) Subject: sparc64: Sync FPU state in VIS emulation handler. X-Git-Tag: v2.6.28-rc8~57^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=410d2c8187ed969238ba98008c1d57307a56cfd8;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David S. Miller --- diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 69f8a35c6bc..b956fd71c13 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/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)) return -EFAULT; + save_and_clear_fpu(); + opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; switch (opf) { default: