From 815d5ec86eb8d5f57e5e4aa147bd1fb6338c58ac Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:05:57 -0800 Subject: [PATCH] arm: task_pt_regs() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-arm/processor.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/asm-arm') diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 7d4118e0905..fb5877e5a39 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h @@ -85,9 +85,11 @@ unsigned long get_wchan(struct task_struct *p); */ extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); -#define KSTK_REGS(tsk) (((struct pt_regs *)(THREAD_START_SP + (unsigned long)(tsk)->thread_info)) - 1) -#define KSTK_EIP(tsk) KSTK_REGS(tsk)->ARM_pc -#define KSTK_ESP(tsk) KSTK_REGS(tsk)->ARM_sp +#define task_pt_regs(p) \ + ((struct pt_regs *)(THREAD_START_SP + (void *)(p)->thread_info) - 1) + +#define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc +#define KSTK_ESP(tsk) task_pt_regs(tsk)->ARM_sp /* * Prefetching support - only ARMv5. -- cgit v1.2.3