aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHong H. Pham <hong.pham@windriver.com>2008-12-04 09:12:57 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-13 15:29:14 -0800
commitfc27e1db48a5b3d551a50bbe6770577ce4e64d51 (patch)
treeddc835b1101a50fbf22a8b433bf7364bb3e606fc /arch
parent1922738d51d26b4c204d8a55c552d58c74ae011d (diff)
sparc64: Sync FPU state in VIS emulation handler.
[ 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/visemul.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c
index 4e285f98d51..a4428fda35c 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: