X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-um%2Fthread_info.h;h=6e5fd5c892d069439ed56191d837df54dd94dd58;hb=96b418c960af0d5c7185ff5c4af9376eb37ac9d3;hp=261e2f4528f6a62e1f5dd94c41ff06d5405beeed;hpb=8542e5893c2b10b4f6c80149e7dc3fdd2dc38bc6;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 261e2f4528f..6e5fd5c892d 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -22,6 +22,7 @@ struct thread_info { 0-0xBFFFFFFF for user 0-0xFFFFFFFF for kernel */ struct restart_block restart_block; + struct thread_info *real_thread; /* Points to non-IRQ stack */ }; #define INIT_THREAD_INFO(tsk) \ @@ -35,6 +36,7 @@ struct thread_info { .restart_block = { \ .fn = do_no_restart_syscall, \ }, \ + .real_thread = NULL, \ } #define init_thread_info (init_thread_union.thread_info) @@ -50,10 +52,21 @@ static inline struct thread_info *current_thread_info(void) return ti; } +#ifdef CONFIG_DEBUG_STACK_USAGE + +#define alloc_thread_info(tsk) \ + ((struct thread_info *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, \ + CONFIG_KERNEL_STACK_ORDER)) +#else + /* thread information allocation */ #define alloc_thread_info(tsk) \ - ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) -#define free_thread_info(ti) kfree(ti) + ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ + CONFIG_KERNEL_STACK_ORDER)) +#endif + +#define free_thread_info(ti) \ + free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) #endif