diff options
Diffstat (limited to 'include/asm-um/thread_info.h')
-rw-r--r-- | include/asm-um/thread_info.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 07aa4e50e4d0..6e5fd5c892d0 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -52,10 +52,19 @@ static inline struct thread_info *current_thread_info(void) | |||
52 | return ti; | 52 | return ti; |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
56 | |||
57 | #define alloc_thread_info(tsk) \ | ||
58 | ((struct thread_info *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, \ | ||
59 | CONFIG_KERNEL_STACK_ORDER)) | ||
60 | #else | ||
61 | |||
55 | /* thread information allocation */ | 62 | /* thread information allocation */ |
56 | #define alloc_thread_info(tsk) \ | 63 | #define alloc_thread_info(tsk) \ |
57 | ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ | 64 | ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ |
58 | CONFIG_KERNEL_STACK_ORDER)) | 65 | CONFIG_KERNEL_STACK_ORDER)) |
66 | #endif | ||
67 | |||
59 | #define free_thread_info(ti) \ | 68 | #define free_thread_info(ti) \ |
60 | free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) | 69 | free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) |
61 | 70 | ||