]> pilppa.com Git - linux-2.6-omap-h63xx.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Dec 2008 17:12:57 +0000 (09:12 -0800)
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>
arch/sparc64/kernel/visemul.c

index 69f8a35c6bcdef4e885738a2c1c49ffe4377ce3b..b956fd71c131143e4240ebea47548ab110c747a0 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: