diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:05:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:54 -0500 |
commit | c7584fb6b46a71a1aba5e06dc3cc54ce10f0129e (patch) | |
tree | 20c405cf083c77418d2f252b64e9d735cb0012f0 /include/asm-s390 | |
parent | 579b3ea5916d60ade1e04d2a49637e5cbba67eac (diff) |
[PATCH] s390: task_pt_regs()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-s390')
-rw-r--r-- | include/asm-s390/elf.h | 2 | ||||
-rw-r--r-- | include/asm-s390/processor.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index 372d51cccd53..710646e64f7d 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) | |||
163 | 163 | ||
164 | static inline int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | 164 | static inline int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) |
165 | { | 165 | { |
166 | struct pt_regs *ptregs = __KSTK_PTREGS(tsk); | 166 | struct pt_regs *ptregs = task_pt_regs(tsk); |
167 | memcpy(®s->psw, &ptregs->psw, sizeof(regs->psw)+sizeof(regs->gprs)); | 167 | memcpy(®s->psw, &ptregs->psw, sizeof(regs->psw)+sizeof(regs->gprs)); |
168 | memcpy(regs->acrs, tsk->thread.acrs, sizeof(regs->acrs)); | 168 | memcpy(regs->acrs, tsk->thread.acrs, sizeof(regs->acrs)); |
169 | regs->orig_gpr2 = ptregs->orig_gpr2; | 169 | regs->orig_gpr2 = ptregs->orig_gpr2; |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 4ec652ebb3b1..795bfcb95def 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); | |||
191 | extern void show_trace(struct task_struct *task, unsigned long *sp); | 191 | extern void show_trace(struct task_struct *task, unsigned long *sp); |
192 | 192 | ||
193 | unsigned long get_wchan(struct task_struct *p); | 193 | unsigned long get_wchan(struct task_struct *p); |
194 | #define __KSTK_PTREGS(tsk) ((struct pt_regs *) \ | 194 | #define task_pt_regs(tsk) ((struct pt_regs *) \ |
195 | ((unsigned long) tsk->thread_info + THREAD_SIZE - sizeof(struct pt_regs))) | 195 | ((void *)(tsk)->thread_info + THREAD_SIZE) - 1) |
196 | #define KSTK_EIP(tsk) (__KSTK_PTREGS(tsk)->psw.addr) | 196 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr) |
197 | #define KSTK_ESP(tsk) (__KSTK_PTREGS(tsk)->gprs[15]) | 197 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15]) |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Give up the time slice of the virtual PU. | 200 | * Give up the time slice of the virtual PU. |