Commit 0efcafb0 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Sync FPU state in VIS emulation handler.
  sparc64: Fix VIS emulation bugs
  sparc: asm/bitops.h should define __fls
  sparc64: Fix bug in PTRACE_SETFPREGS64 handling.
parents e948990f 410d2c81
...@@ -98,6 +98,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) ...@@ -98,6 +98,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
#include <asm-generic/bitops/sched.h> #include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/ffs.h> #include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/fls.h> #include <asm-generic/bitops/fls.h>
#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/fls64.h> #include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/hweight.h> #include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h> #include <asm-generic/bitops/lock.h>
......
...@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ...@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break; break;
case PTRACE_SETFPREGS64: case PTRACE_SETFPREGS64:
ret = copy_regset_to_user(child, view, REGSET_FP, ret = copy_regset_from_user(child, view, REGSET_FP,
0 * sizeof(u64), 0 * sizeof(u64),
33 * sizeof(u64), 33 * sizeof(u64),
fps); fps);
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
#define VIS_OPF_SHIFT 5 #define VIS_OPF_SHIFT 5
#define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT)
#define RS1(INSN) (((INSN) >> 24) & 0x1f) #define RS1(INSN) (((INSN) >> 14) & 0x1f)
#define RS2(INSN) (((INSN) >> 0) & 0x1f) #define RS2(INSN) (((INSN) >> 0) & 0x1f)
#define RD(INSN) (((INSN) >> 25) & 0x1f) #define RD(INSN) (((INSN) >> 25) & 0x1f)
...@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, unsigned int insn) ...@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, unsigned int insn)
unsigned long i; unsigned long i;
rs1 = fpd_regval(f, RS1(insn)); rs1 = fpd_regval(f, RS1(insn));
rs2 = fpd_regval(f, RS1(insn)); rs2 = fpd_regval(f, RS2(insn));
rd = fpd_regaddr(f, RD(insn)); rd = fpd_regaddr(f, RD(insn));
rd_val = *rd; rd_val = *rd;
...@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) ...@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
if (get_user(insn, (u32 __user *) pc)) if (get_user(insn, (u32 __user *) pc))
return -EFAULT; return -EFAULT;
save_and_clear_fpu();
opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
switch (opf) { switch (opf) {
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment