aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-28 18:52:00 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-28 19:46:13 -0400
commitb3461034d7d46455060c8476910be22b6b0fc313 (patch)
treed5ebcf803116eb3c5800189ebb065df28c994d07 /include/asm-um
parent37fce857bec00d26d0e8251c909da2bd8736c949 (diff)
[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/asm-um')
-rw-r--r--include/asm-um/thread_info.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
index a10ea155907e..e4f0198240c5 100644
--- a/include/asm-um/thread_info.h
+++ b/include/asm-um/thread_info.h
@@ -41,18 +41,17 @@ struct thread_info {
41#define init_thread_info (init_thread_union.thread_info) 41#define init_thread_info (init_thread_union.thread_info)
42#define init_stack (init_thread_union.stack) 42#define init_stack (init_thread_union.stack)
43 43
44#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
44/* how to get the thread information struct from C */ 45/* how to get the thread information struct from C */
45static inline struct thread_info *current_thread_info(void) 46static inline struct thread_info *current_thread_info(void)
46{ 47{
47 struct thread_info *ti; 48 struct thread_info *ti;
48 unsigned long mask = PAGE_SIZE * 49 unsigned long mask = THREAD_SIZE - 1;
49 (1 << CONFIG_KERNEL_STACK_ORDER) - 1; 50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
51 return ti; 51 return ti;
52} 52}
53 53
54/* thread information allocation */ 54/* thread information allocation */
55#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
56#define alloc_thread_info(tsk) \ 55#define alloc_thread_info(tsk) \
57 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) 56 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
58#define free_thread_info(ti) kfree(ti) 57#define free_thread_info(ti) kfree(ti)