aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/entry.h6
-rw-r--r--arch/sparc64/kernel/ptrace.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/entry.h b/arch/sparc64/kernel/entry.h
index e66d94c7caff..0d0de9c32a80 100644
--- a/arch/sparc64/kernel/entry.h
+++ b/arch/sparc64/kernel/entry.h
@@ -1,8 +1,9 @@
1#ifndef _ENTRY_H 1#ifndef _ENTRY_H
2#define _ENTRY_H 2#define _ENTRY_H
3 3
4#include <linux/init.h> 4#include <linux/kernel.h>
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/init.h>
6 7
7extern char *sparc_cpu_type; 8extern char *sparc_cpu_type;
8extern char *sparc_fpu_type; 9extern char *sparc_fpu_type;
@@ -13,6 +14,9 @@ extern void __init boot_cpu_id_too_large(int cpu);
13extern unsigned int dcache_parity_tl1_occurred; 14extern unsigned int dcache_parity_tl1_occurred;
14extern unsigned int icache_parity_tl1_occurred; 15extern unsigned int icache_parity_tl1_occurred;
15 16
17extern asmlinkage void syscall_trace(struct pt_regs *regs,
18 int syscall_exit_p);
19
16extern void bad_trap_tl1(struct pt_regs *regs, long lvl); 20extern void bad_trap_tl1(struct pt_regs *regs, long lvl);
17 21
18extern void do_fpe_common(struct pt_regs *regs); 22extern void do_fpe_common(struct pt_regs *regs);
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index 9a1ba1fe859d..4b31d2ff69bf 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -35,6 +35,9 @@
35#include <asm/spitfire.h> 35#include <asm/spitfire.h>
36#include <asm/page.h> 36#include <asm/page.h>
37#include <asm/cpudata.h> 37#include <asm/cpudata.h>
38#include <asm/cacheflush.h>
39
40#include "entry.h"
38 41
39/* #define ALLOW_INIT_TRACING */ 42/* #define ALLOW_INIT_TRACING */
40 43
@@ -807,11 +810,14 @@ struct fps {
807long arch_ptrace(struct task_struct *child, long request, long addr, long data) 810long arch_ptrace(struct task_struct *child, long request, long addr, long data)
808{ 811{
809 const struct user_regset_view *view = task_user_regset_view(child); 812 const struct user_regset_view *view = task_user_regset_view(child);
810 struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
811 unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; 813 unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4];
812 struct fps __user *fps = (struct fps __user *) addr; 814 struct pt_regs __user *pregs;
815 struct fps __user *fps;
813 int ret; 816 int ret;
814 817
818 pregs = (struct pt_regs __user *) (unsigned long) addr;
819 fps = (struct fps __user *) (unsigned long) addr;
820
815 switch (request) { 821 switch (request) {
816 case PTRACE_PEEKUSR: 822 case PTRACE_PEEKUSR:
817 ret = (addr != 0) ? -EIO : 0; 823 ret = (addr != 0) ? -EIO : 0;