diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 10:51:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 10:51:49 -0400 |
commit | 1dfd166e93f98892aa4427069a23ed73259983c8 (patch) | |
tree | c70a347b963091b99bd16842537153fa36e5c0e9 /arch/sh/kernel/ptrace_64.c | |
parent | 8e775167d54e6521e7cdbc03ee7ec42a8c67b49a (diff) | |
parent | 8df399018df120d28f89fda6f2515cc6e096e43d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (110 commits)
sh: i2c-sh7760: Replase from ctrl_* to __raw_*
sh: clkfwk: Shuffle around to match the intc split up.
sh: clkfwk: modify for_each_frequency end condition
sh: fix clk_get() error handling
sh: clkfwk: Fix fault in frequency iterator.
sh: clkfwk: Add a helper for rate rounding by divisor ranges.
sh: clkfwk: Abstract rate rounding helper.
sh: clkfwk: support clock remapping.
sh: pci: Convert to upper/lower_32_bits() helpers.
sh: mach-sdk7786: Add support for the FPGA SRAM.
sh: Provide a generic SRAM pool for tiny memories.
sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786.
sh: pci: Support slot 4 routing on SDK7786.
sh: Fix up PMB locking.
sh: mach-sdk7786: Add support for fpga gpios.
sh: use pr_fmt for clock framework, too.
sh: remove name and id from struct clk
sh: free-without-alloc fix for sh_mobile_lcdcfb
sh: perf: Set up perf_max_events.
sh: perf: Support SH-X3 hardware counters.
...
Fix up trivial conflicts (perf_max_events got removed) in arch/sh/kernel/perf_event.c
Diffstat (limited to 'arch/sh/kernel/ptrace_64.c')
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 88 |
1 files changed, 82 insertions, 6 deletions
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 5fd644da7f02..e0fb065914aa 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/user.h> | 26 | #include <linux/user.h> |
@@ -252,6 +252,85 @@ static int fpregs_active(struct task_struct *target, | |||
252 | } | 252 | } |
253 | #endif | 253 | #endif |
254 | 254 | ||
255 | const struct pt_regs_offset regoffset_table[] = { | ||
256 | REG_OFFSET_NAME(pc), | ||
257 | REG_OFFSET_NAME(sr), | ||
258 | REG_OFFSET_NAME(syscall_nr), | ||
259 | REGS_OFFSET_NAME(0), | ||
260 | REGS_OFFSET_NAME(1), | ||
261 | REGS_OFFSET_NAME(2), | ||
262 | REGS_OFFSET_NAME(3), | ||
263 | REGS_OFFSET_NAME(4), | ||
264 | REGS_OFFSET_NAME(5), | ||
265 | REGS_OFFSET_NAME(6), | ||
266 | REGS_OFFSET_NAME(7), | ||
267 | REGS_OFFSET_NAME(8), | ||
268 | REGS_OFFSET_NAME(9), | ||
269 | REGS_OFFSET_NAME(10), | ||
270 | REGS_OFFSET_NAME(11), | ||
271 | REGS_OFFSET_NAME(12), | ||
272 | REGS_OFFSET_NAME(13), | ||
273 | REGS_OFFSET_NAME(14), | ||
274 | REGS_OFFSET_NAME(15), | ||
275 | REGS_OFFSET_NAME(16), | ||
276 | REGS_OFFSET_NAME(17), | ||
277 | REGS_OFFSET_NAME(18), | ||
278 | REGS_OFFSET_NAME(19), | ||
279 | REGS_OFFSET_NAME(20), | ||
280 | REGS_OFFSET_NAME(21), | ||
281 | REGS_OFFSET_NAME(22), | ||
282 | REGS_OFFSET_NAME(23), | ||
283 | REGS_OFFSET_NAME(24), | ||
284 | REGS_OFFSET_NAME(25), | ||
285 | REGS_OFFSET_NAME(26), | ||
286 | REGS_OFFSET_NAME(27), | ||
287 | REGS_OFFSET_NAME(28), | ||
288 | REGS_OFFSET_NAME(29), | ||
289 | REGS_OFFSET_NAME(30), | ||
290 | REGS_OFFSET_NAME(31), | ||
291 | REGS_OFFSET_NAME(32), | ||
292 | REGS_OFFSET_NAME(33), | ||
293 | REGS_OFFSET_NAME(34), | ||
294 | REGS_OFFSET_NAME(35), | ||
295 | REGS_OFFSET_NAME(36), | ||
296 | REGS_OFFSET_NAME(37), | ||
297 | REGS_OFFSET_NAME(38), | ||
298 | REGS_OFFSET_NAME(39), | ||
299 | REGS_OFFSET_NAME(40), | ||
300 | REGS_OFFSET_NAME(41), | ||
301 | REGS_OFFSET_NAME(42), | ||
302 | REGS_OFFSET_NAME(43), | ||
303 | REGS_OFFSET_NAME(44), | ||
304 | REGS_OFFSET_NAME(45), | ||
305 | REGS_OFFSET_NAME(46), | ||
306 | REGS_OFFSET_NAME(47), | ||
307 | REGS_OFFSET_NAME(48), | ||
308 | REGS_OFFSET_NAME(49), | ||
309 | REGS_OFFSET_NAME(50), | ||
310 | REGS_OFFSET_NAME(51), | ||
311 | REGS_OFFSET_NAME(52), | ||
312 | REGS_OFFSET_NAME(53), | ||
313 | REGS_OFFSET_NAME(54), | ||
314 | REGS_OFFSET_NAME(55), | ||
315 | REGS_OFFSET_NAME(56), | ||
316 | REGS_OFFSET_NAME(57), | ||
317 | REGS_OFFSET_NAME(58), | ||
318 | REGS_OFFSET_NAME(59), | ||
319 | REGS_OFFSET_NAME(60), | ||
320 | REGS_OFFSET_NAME(61), | ||
321 | REGS_OFFSET_NAME(62), | ||
322 | REGS_OFFSET_NAME(63), | ||
323 | TREGS_OFFSET_NAME(0), | ||
324 | TREGS_OFFSET_NAME(1), | ||
325 | TREGS_OFFSET_NAME(2), | ||
326 | TREGS_OFFSET_NAME(3), | ||
327 | TREGS_OFFSET_NAME(4), | ||
328 | TREGS_OFFSET_NAME(5), | ||
329 | TREGS_OFFSET_NAME(6), | ||
330 | TREGS_OFFSET_NAME(7), | ||
331 | REG_OFFSET_END, | ||
332 | }; | ||
333 | |||
255 | /* | 334 | /* |
256 | * These are our native regset flavours. | 335 | * These are our native regset flavours. |
257 | */ | 336 | */ |
@@ -395,10 +474,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
395 | asmlinkage int sh64_ptrace(long request, long pid, long addr, long data) | 474 | asmlinkage int sh64_ptrace(long request, long pid, long addr, long data) |
396 | { | 475 | { |
397 | #define WPC_DBRMODE 0x0d104008 | 476 | #define WPC_DBRMODE 0x0d104008 |
398 | static int first_call = 1; | 477 | static unsigned long first_call; |
399 | 478 | ||
400 | lock_kernel(); | 479 | if (!test_and_set_bit(0, &first_call)) { |
401 | if (first_call) { | ||
402 | /* Set WPC.DBRMODE to 0. This makes all debug events get | 480 | /* Set WPC.DBRMODE to 0. This makes all debug events get |
403 | * delivered through RESVEC, i.e. into the handlers in entry.S. | 481 | * delivered through RESVEC, i.e. into the handlers in entry.S. |
404 | * (If the kernel was downloaded using a remote gdb, WPC.DBRMODE | 482 | * (If the kernel was downloaded using a remote gdb, WPC.DBRMODE |
@@ -408,9 +486,7 @@ asmlinkage int sh64_ptrace(long request, long pid, long addr, long data) | |||
408 | * the remote gdb.) */ | 486 | * the remote gdb.) */ |
409 | printk("DBRMODE set to 0 to permit native debugging\n"); | 487 | printk("DBRMODE set to 0 to permit native debugging\n"); |
410 | poke_real_address_q(WPC_DBRMODE, 0); | 488 | poke_real_address_q(WPC_DBRMODE, 0); |
411 | first_call = 0; | ||
412 | } | 489 | } |
413 | unlock_kernel(); | ||
414 | 490 | ||
415 | return sys_ptrace(request, pid, addr, data); | 491 | return sys_ptrace(request, pid, addr, data); |
416 | } | 492 | } |