aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-05 00:40:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-05 00:40:17 -0500
commit0efcafb0fb7a163999a8821e8a5e7792fca90a2d (patch)
tree649d16382e562f595ec55b2aa9ec0d8c5824629b /arch
parente948990f958c6c41036a99c8a6581e35e7e23d80 (diff)
parent410d2c8187ed969238ba98008c1d57307a56cfd8 (diff)
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.
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/bitops_32.h1
-rw-r--r--arch/sparc64/kernel/ptrace.c2
-rw-r--r--arch/sparc64/kernel/visemul.c6
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/bitops_32.h b/arch/sparc/include/asm/bitops_32.h
index 68b98a7e6454..9cf4ae0cd7ba 100644
--- a/arch/sparc/include/asm/bitops_32.h
+++ b/arch/sparc/include/asm/bitops_32.h
@@ -98,6 +98,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
98#include <asm-generic/bitops/sched.h> 98#include <asm-generic/bitops/sched.h>
99#include <asm-generic/bitops/ffs.h> 99#include <asm-generic/bitops/ffs.h>
100#include <asm-generic/bitops/fls.h> 100#include <asm-generic/bitops/fls.h>
101#include <asm-generic/bitops/__fls.h>
101#include <asm-generic/bitops/fls64.h> 102#include <asm-generic/bitops/fls64.h>
102#include <asm-generic/bitops/hweight.h> 103#include <asm-generic/bitops/hweight.h>
103#include <asm-generic/bitops/lock.h> 104#include <asm-generic/bitops/lock.h>
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index f43adbc773ca..a941c610e7ce 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
1014 break; 1014 break;
1015 1015
1016 case PTRACE_SETFPREGS64: 1016 case PTRACE_SETFPREGS64:
1017 ret = copy_regset_to_user(child, view, REGSET_FP, 1017 ret = copy_regset_from_user(child, view, REGSET_FP,
1018 0 * sizeof(u64), 1018 0 * sizeof(u64),
1019 33 * sizeof(u64), 1019 33 * sizeof(u64),
1020 fps); 1020 fps);
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: