diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:58 -0500 |
commit | ab03591db110e8d195d381a68692eb37da981cdf (patch) | |
tree | 2ebf699572844388ee9a12407e31d2915a399cb5 /include | |
parent | 718d6114fcd894bf4d3527b9e206a1cbcaaae35d (diff) |
[PATCH] ia64: task_thread_info()
on ia64 thread_info is at the constant offset from task_struct and stack
is embedded into the same beast. Set __HAVE_THREAD_FUNCTIONS, made
task_thread_info() just add a constant.
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')
-rw-r--r-- | include/asm-ia64/thread_info.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 171b2207bde4..653bb7f9a753 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -57,11 +57,20 @@ struct thread_info { | |||
57 | /* how to get the thread information struct from C */ | 57 | /* how to get the thread information struct from C */ |
58 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) | 58 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) |
59 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 59 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) |
60 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | ||
60 | #else | 61 | #else |
61 | #define current_thread_info() ((struct thread_info *) 0) | 62 | #define current_thread_info() ((struct thread_info *) 0) |
62 | #define alloc_thread_info(tsk) ((struct thread_info *) 0) | 63 | #define alloc_thread_info(tsk) ((struct thread_info *) 0) |
64 | #define task_thread_info(tsk) ((struct thread_info *) 0) | ||
63 | #endif | 65 | #endif |
64 | #define free_thread_info(ti) /* nothing */ | 66 | #define free_thread_info(ti) /* nothing */ |
67 | #define task_stack_page(tsk) ((void *)(tsk)) | ||
68 | |||
69 | #define __HAVE_THREAD_FUNCTIONS | ||
70 | #define setup_thread_stack(p, org) \ | ||
71 | *task_thread_info(p) = *task_thread_info(org); \ | ||
72 | task_thread_info(p)->task = (p); | ||
73 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | ||
65 | 74 | ||
66 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 75 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
67 | #define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) | 76 | #define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) |