diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:58 -0500 |
commit | 6450578f32cdca587ae5f148e2118b2fcc36bb11 (patch) | |
tree | 91ad424aae66d72fc370dc624fca3f42d830675b /include/asm-ia64 | |
parent | ab03591db110e8d195d381a68692eb37da981cdf (diff) |
[PATCH] ia64: 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-ia64')
-rw-r--r-- | include/asm-ia64/compat.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/processor.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/system.h | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h index aaf11f4e9169..c0b19106665c 100644 --- a/include/asm-ia64/compat.h +++ b/include/asm-ia64/compat.h | |||
@@ -192,7 +192,7 @@ compat_ptr (compat_uptr_t uptr) | |||
192 | static __inline__ void __user * | 192 | static __inline__ void __user * |
193 | compat_alloc_user_space (long len) | 193 | compat_alloc_user_space (long len) |
194 | { | 194 | { |
195 | struct pt_regs *regs = ia64_task_regs(current); | 195 | struct pt_regs *regs = task_pt_regs(current); |
196 | return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len); | 196 | return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len); |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 94e07e727395..8c648bf72bbd 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -352,7 +352,7 @@ extern unsigned long get_wchan (struct task_struct *p); | |||
352 | /* Return instruction pointer of blocked task TSK. */ | 352 | /* Return instruction pointer of blocked task TSK. */ |
353 | #define KSTK_EIP(tsk) \ | 353 | #define KSTK_EIP(tsk) \ |
354 | ({ \ | 354 | ({ \ |
355 | struct pt_regs *_regs = ia64_task_regs(tsk); \ | 355 | struct pt_regs *_regs = task_pt_regs(tsk); \ |
356 | _regs->cr_iip + ia64_psr(_regs)->ri; \ | 356 | _regs->cr_iip + ia64_psr(_regs)->ri; \ |
357 | }) | 357 | }) |
358 | 358 | ||
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 2c703d6e0c86..9471cdc3f4c0 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -248,7 +248,7 @@ struct switch_stack { | |||
248 | }) | 248 | }) |
249 | 249 | ||
250 | /* given a pointer to a task_struct, return the user's pt_regs */ | 250 | /* given a pointer to a task_struct, return the user's pt_regs */ |
251 | # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) | 251 | # define task_pt_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) |
252 | # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) | 252 | # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) |
253 | # define user_mode(regs) (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0) | 253 | # define user_mode(regs) (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0) |
254 | # define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs)) | 254 | # define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs)) |
@@ -271,7 +271,7 @@ struct switch_stack { | |||
271 | * | 271 | * |
272 | * On ia64, we can clear the user's pt_regs->r8 to force a successful syscall. | 272 | * On ia64, we can clear the user's pt_regs->r8 to force a successful syscall. |
273 | */ | 273 | */ |
274 | # define force_successful_syscall_return() (ia64_task_regs(current)->r8 = 0) | 274 | # define force_successful_syscall_return() (task_pt_regs(current)->r8 = 0) |
275 | 275 | ||
276 | struct task_struct; /* forward decl */ | 276 | struct task_struct; /* forward decl */ |
277 | struct unw_frame_info; /* forward decl */ | 277 | struct unw_frame_info; /* forward decl */ |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 510c31c50723..80c5a234e259 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -219,14 +219,14 @@ extern void ia64_load_extra (struct task_struct *task); | |||
219 | 219 | ||
220 | #define IA64_HAS_EXTRA_STATE(t) \ | 220 | #define IA64_HAS_EXTRA_STATE(t) \ |
221 | ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \ | 221 | ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \ |
222 | || IS_IA32_PROCESS(ia64_task_regs(t)) || PERFMON_IS_SYSWIDE()) | 222 | || IS_IA32_PROCESS(task_pt_regs(t)) || PERFMON_IS_SYSWIDE()) |
223 | 223 | ||
224 | #define __switch_to(prev,next,last) do { \ | 224 | #define __switch_to(prev,next,last) do { \ |
225 | if (IA64_HAS_EXTRA_STATE(prev)) \ | 225 | if (IA64_HAS_EXTRA_STATE(prev)) \ |
226 | ia64_save_extra(prev); \ | 226 | ia64_save_extra(prev); \ |
227 | if (IA64_HAS_EXTRA_STATE(next)) \ | 227 | if (IA64_HAS_EXTRA_STATE(next)) \ |
228 | ia64_load_extra(next); \ | 228 | ia64_load_extra(next); \ |
229 | ia64_psr(ia64_task_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \ | 229 | ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \ |
230 | (last) = ia64_switch_to((next)); \ | 230 | (last) = ia64_switch_to((next)); \ |
231 | } while (0) | 231 | } while (0) |
232 | 232 | ||
@@ -238,8 +238,8 @@ extern void ia64_load_extra (struct task_struct *task); | |||
238 | * the latest fph state from another CPU. In other words: eager save, lazy restore. | 238 | * the latest fph state from another CPU. In other words: eager save, lazy restore. |
239 | */ | 239 | */ |
240 | # define switch_to(prev,next,last) do { \ | 240 | # define switch_to(prev,next,last) do { \ |
241 | if (ia64_psr(ia64_task_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \ | 241 | if (ia64_psr(task_pt_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \ |
242 | ia64_psr(ia64_task_regs(prev))->mfh = 0; \ | 242 | ia64_psr(task_pt_regs(prev))->mfh = 0; \ |
243 | (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \ | 243 | (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \ |
244 | __ia64_save_fpu((prev)->thread.fph); \ | 244 | __ia64_save_fpu((prev)->thread.fph); \ |
245 | } \ | 245 | } \ |