[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>
This commit is contained in:
committed by
Linus Torvalds
parent
37fce857be
commit
b3461034d7
@@ -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)
|
||||
|
Reference in New Issue
Block a user