diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/include/asm/ptrace.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/include/asm/ptrace.h')
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index 1dc12cb44a2d..2168fde25611 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -102,13 +102,15 @@ struct pt_dspregs { | |||
102 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ | 102 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ |
103 | #define PTRACE_SETDSPREGS 56 | 103 | #define PTRACE_SETDSPREGS 56 |
104 | 104 | ||
105 | #define PT_TEXT_END_ADDR 240 | 105 | #define PT_TEXT_END_ADDR 240 |
106 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ | 106 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ |
107 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ | 107 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ |
108 | #define PT_TEXT_LEN 252 | 108 | #define PT_TEXT_LEN 252 |
109 | 109 | ||
110 | #ifdef __KERNEL__ | 110 | #ifdef __KERNEL__ |
111 | #include <asm/addrspace.h> | 111 | #include <asm/addrspace.h> |
112 | #include <asm/page.h> | ||
113 | #include <asm/system.h> | ||
112 | 114 | ||
113 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 115 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) |
114 | #define instruction_pointer(regs) ((unsigned long)(regs)->pc) | 116 | #define instruction_pointer(regs) ((unsigned long)(regs)->pc) |
@@ -121,8 +123,12 @@ extern void show_regs(struct pt_regs *); | |||
121 | struct task_struct; | 123 | struct task_struct; |
122 | 124 | ||
123 | #define arch_has_single_step() (1) | 125 | #define arch_has_single_step() (1) |
124 | extern void user_enable_single_step(struct task_struct *); | 126 | |
125 | extern void user_disable_single_step(struct task_struct *); | 127 | struct perf_event; |
128 | struct perf_sample_data; | ||
129 | |||
130 | extern void ptrace_triggered(struct perf_event *bp, int nmi, | ||
131 | struct perf_sample_data *data, struct pt_regs *regs); | ||
126 | 132 | ||
127 | #define task_pt_regs(task) \ | 133 | #define task_pt_regs(task) \ |
128 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1) | 134 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1) |
@@ -131,10 +137,8 @@ static inline unsigned long profile_pc(struct pt_regs *regs) | |||
131 | { | 137 | { |
132 | unsigned long pc = instruction_pointer(regs); | 138 | unsigned long pc = instruction_pointer(regs); |
133 | 139 | ||
134 | #ifdef P2SEG | 140 | if (virt_addr_uncached(pc)) |
135 | if (pc >= P2SEG && pc < P3SEG) | 141 | return CAC_ADDR(pc); |
136 | pc -= 0x20000000; | ||
137 | #endif | ||
138 | 142 | ||
139 | return pc; | 143 | return pc; |
140 | } | 144 | } |