]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sparc64: Sync FPU state in VIS emulation handler.
authorHong H. Pham <hong.pham@windriver.com>
Thu, 4 Dec 2008 17:12:57 +0000 (09:12 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:14 +0000 (15:29 -0800)
[ Upstream commit 410d2c8187ed969238ba98008c1d57307a56cfd8 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/visemul.c

index 4e285f98d5198036b2cc3fbe24d6ca6360ff6b83..a4428fda35c948ae5dc192b3e0d89adacf17db5a 100644 (file)
@@ -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: