From a6a6de689cd246d634c74f3e6e7fcc0ca8827e9f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 5 Nov 2012 13:00:27 -0500 Subject: [PATCH] --- yaml --- r: 340359 b: refs/heads/master c: 22062a96300dabfef93368a28c34bdf35c9b8308 h: refs/heads/master i: 340357: d75f06210a8c51cb2adde248c8117f32131e8524 340355: d4b5bbbfcf9557b96da4abfab626d7a6c5bd1c1c 340351: 775b1e150cbcd11df6d55a9ce515a04a22f4eba9 v: v3 --- [refs] | 2 +- trunk/arch/alpha/include/asm/ptrace.h | 1 + trunk/arch/h8300/include/asm/ptrace.h | 1 + trunk/include/linux/ptrace.h | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 71af9807aa7c..9eb3f8b85ce6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4f4202fe5ae9a43e59303f20d700571f695d7b1b +refs/heads/master: 22062a96300dabfef93368a28c34bdf35c9b8308 diff --git a/trunk/arch/alpha/include/asm/ptrace.h b/trunk/arch/alpha/include/asm/ptrace.h index b87755a19554..b4c5b2fbb647 100644 --- a/trunk/arch/alpha/include/asm/ptrace.h +++ b/trunk/arch/alpha/include/asm/ptrace.h @@ -78,6 +78,7 @@ struct switch_stack { #define current_pt_regs() \ ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) +#define signal_pt_regs current_pt_regs #define force_successful_syscall_return() (current_pt_regs()->r0 = 0) diff --git a/trunk/arch/h8300/include/asm/ptrace.h b/trunk/arch/h8300/include/asm/ptrace.h index 00502a61bf0a..7468589a128b 100644 --- a/trunk/arch/h8300/include/asm/ptrace.h +++ b/trunk/arch/h8300/include/asm/ptrace.h @@ -62,6 +62,7 @@ struct pt_regs { #define profile_pc(regs) instruction_pointer(regs) #define current_pt_regs() ((struct pt_regs *) \ (THREAD_SIZE + (unsigned long)current_thread_info()) - 1) +#define signal_pt_regs() ((struct pt_regs *)current->thread.esp0) #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif /* _H8300_PTRACE_H */ diff --git a/trunk/include/linux/ptrace.h b/trunk/include/linux/ptrace.h index 7aefbae2452e..b8e6dcec78ae 100644 --- a/trunk/include/linux/ptrace.h +++ b/trunk/include/linux/ptrace.h @@ -333,6 +333,15 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, #define ptrace_signal_deliver(regs, cookie) do { } while (0) #endif +/* + * unlike current_pt_regs(), this one is equal to task_pt_regs(current) + * on *all* architectures; the only reason to have a per-arch definition + * is optimisation. + */ +#ifndef signal_pt_regs +#define signal_pt_regs() task_pt_regs(current) +#endif + extern int task_current_syscall(struct task_struct *target, long *callno, unsigned long args[6], unsigned int maxargs, unsigned long *sp, unsigned long *pc);