diff options
Diffstat (limited to 'arch/sparc64/kernel/visemul.c')
-rw-r--r-- | arch/sparc64/kernel/visemul.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 9e05cb5cb855..b956fd71c131 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/arch/sparc64/kernel/visemul.c | |||
@@ -131,7 +131,7 @@ | |||
131 | #define VIS_OPF_SHIFT 5 | 131 | #define VIS_OPF_SHIFT 5 |
132 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) | 132 | #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) |
133 | 133 | ||
134 | #define RS1(INSN) (((INSN) >> 24) & 0x1f) | 134 | #define RS1(INSN) (((INSN) >> 14) & 0x1f) |
135 | #define RS2(INSN) (((INSN) >> 0) & 0x1f) | 135 | #define RS2(INSN) (((INSN) >> 0) & 0x1f) |
136 | #define RD(INSN) (((INSN) >> 25) & 0x1f) | 136 | #define RD(INSN) (((INSN) >> 25) & 0x1f) |
137 | 137 | ||
@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, unsigned int insn) | |||
445 | unsigned long i; | 445 | unsigned long i; |
446 | 446 | ||
447 | rs1 = fpd_regval(f, RS1(insn)); | 447 | rs1 = fpd_regval(f, RS1(insn)); |
448 | rs2 = fpd_regval(f, RS1(insn)); | 448 | rs2 = fpd_regval(f, RS2(insn)); |
449 | rd = fpd_regaddr(f, RD(insn)); | 449 | rd = fpd_regaddr(f, RD(insn)); |
450 | 450 | ||
451 | rd_val = *rd; | 451 | rd_val = *rd; |
@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) | |||
807 | if (get_user(insn, (u32 __user *) pc)) | 807 | if (get_user(insn, (u32 __user *) pc)) |
808 | return -EFAULT; | 808 | return -EFAULT; |
809 | 809 | ||
810 | save_and_clear_fpu(); | ||
811 | |||
810 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; | 812 | opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; |
811 | switch (opf) { | 813 | switch (opf) { |
812 | default: | 814 | default: |