| From ecff6abb5dd92a2dbee4bcfd10a073b42318c44d Mon Sep 17 00:00:00 2001 |
| From: Hong H. Pham <hong.pham@windriver.com> |
| Date: Thu, 4 Dec 2008 09:12:57 -0800 |
| Subject: sparc64: Sync FPU state in VIS emulation handler. |
| |
| From: Hong H. Pham <hong.pham@windriver.com> |
| |
| [ 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 | 2 ++ |
| 1 file changed, 2 insertions(+) |
| |
| --- a/arch/sparc64/kernel/visemul.c |
| +++ b/arch/sparc64/kernel/visemul.c |
| @@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsig |
| if (get_user(insn, (u32 __user *) pc)) |
| return -EFAULT; |
| |
| + save_and_clear_fpu(); |
| + |
| opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; |
| switch (opf) { |
| default: |