aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro2012-11-05 12:00:27 -0600
committerAl Viro2012-11-28 23:01:23 -0600
commit22062a96300dabfef93368a28c34bdf35c9b8308 (patch)
tree6e04303c437911d21079a34ac0853137eeb91f8b /arch/alpha
parent4f4202fe5ae9a43e59303f20d700571f695d7b1b (diff)
downloadam43-linux-kernel-22062a96300dabfef93368a28c34bdf35c9b8308.tar.gz
am43-linux-kernel-22062a96300dabfef93368a28c34bdf35c9b8308.tar.xz
am43-linux-kernel-22062a96300dabfef93368a28c34bdf35c9b8308.zip
new helper: signal_pt_regs()
Always equal to task_pt_regs(current); defined only when we are in signal delivery. It may be different from current_pt_regs() - e.g. architectures like m68k may have pt_regs location on exception different from that on a syscall and signals (just as ptrace handling) may happen on exceptions as well as on syscalls. When they are equal, it's often better to have signal_pt_regs defined (in asm/ptrace.h) as current_pt_regs - that tends to be optimized better than default would be. However, optimisation is the only reason why we might want an arch-specific definition; if current_pt_regs() and task_pt_regs(current) have different values, the latter one is right. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/include/asm/ptrace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h
index b87755a1955..b4c5b2fbb64 100644
--- a/arch/alpha/include/asm/ptrace.h
+++ b/arch/alpha/include/asm/ptrace.h
@@ -78,6 +78,7 @@ struct switch_stack {
78 78
79#define current_pt_regs() \ 79#define current_pt_regs() \
80 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) 80 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
81#define signal_pt_regs current_pt_regs
81 82
82#define force_successful_syscall_return() (current_pt_regs()->r0 = 0) 83#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
83 84