summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorHong H. Pham <hong.pham@windriver.com>2008-12-04 18:12:57 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-04 18:12:57 +0100
commit410d2c8187ed969238ba98008c1d57307a56cfd8 (patch)
treef8f3e72b996a73bc44a0fedb6318a13285590f0c /arch/sparc64/kernel
parentsparc64: Fix VIS emulation bugs (diff)
downloadlinux-410d2c8187ed969238ba98008c1d57307a56cfd8.tar.xz
linux-410d2c8187ed969238ba98008c1d57307a56cfd8.zip
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>
Diffstat (limited to 'arch/sparc64/kernel')
-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 69f8a35c6bcd..b956fd71c131 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: