diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-05-28 15:52:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-28 16:46:13 -0700 |
commit | b3461034d7d46455060c8476910be22b6b0fc313 (patch) | |
tree | d5ebcf803116eb3c5800189ebb065df28c994d07 /include | |
parent | 37fce857bec00d26d0e8251c909da2bd8736c949 (diff) | |
download | kernel_samsung_smdk4412-b3461034d7d46455060c8476910be22b6b0fc313.tar.gz kernel_samsung_smdk4412-b3461034d7d46455060c8476910be22b6b0fc313.tar.bz2 kernel_samsung_smdk4412-b3461034d7d46455060c8476910be22b6b0fc313.zip |
[PATCH] uml: stack dump fix
Copy (and adapt) to UML the stack code dumper used in i386 when
CONFIG_FRAME_POINTER is enabled.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
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-um/thread_info.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index a10ea155907..e4f0198240c 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -41,18 +41,17 @@ struct thread_info { #define init_thread_info (init_thread_union.thread_info) #define init_stack (init_thread_union.stack) +#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) /* how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) { struct thread_info *ti; - unsigned long mask = PAGE_SIZE * - (1 << CONFIG_KERNEL_STACK_ORDER) - 1; - ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); + unsigned long mask = THREAD_SIZE - 1; + ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); return ti; } /* thread information allocation */ -#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) #define alloc_thread_info(tsk) \ ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) #define free_thread_info(ti) kfree(ti) |