From c7584fb6b46a71a1aba5e06dc3cc54ce10f0129e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:05:49 -0800 Subject: [PATCH] s390: task_pt_regs() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-s390/elf.h | 2 +- include/asm-s390/processor.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index 372d51cccd5..710646e64f7 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h @@ -163,7 +163,7 @@ static inline int dump_regs(struct pt_regs *ptregs, elf_gregset_t *regs) static inline int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) { - struct pt_regs *ptregs = __KSTK_PTREGS(tsk); + struct pt_regs *ptregs = task_pt_regs(tsk); memcpy(®s->psw, &ptregs->psw, sizeof(regs->psw)+sizeof(regs->gprs)); memcpy(regs->acrs, tsk->thread.acrs, sizeof(regs->acrs)); regs->orig_gpr2 = ptregs->orig_gpr2; diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 4ec652ebb3b..795bfcb95de 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -191,10 +191,10 @@ extern void show_registers(struct pt_regs *regs); extern void show_trace(struct task_struct *task, unsigned long *sp); unsigned long get_wchan(struct task_struct *p); -#define __KSTK_PTREGS(tsk) ((struct pt_regs *) \ - ((unsigned long) tsk->thread_info + THREAD_SIZE - sizeof(struct pt_regs))) -#define KSTK_EIP(tsk) (__KSTK_PTREGS(tsk)->psw.addr) -#define KSTK_ESP(tsk) (__KSTK_PTREGS(tsk)->gprs[15]) +#define task_pt_regs(tsk) ((struct pt_regs *) \ + ((void *)(tsk)->thread_info + THREAD_SIZE) - 1) +#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr) +#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15]) /* * Give up the time slice of the virtual PU. -- cgit v1.2.3