|
@@ -52,10 +52,19 @@ static inline struct thread_info *current_thread_info(void)
|
|
return ti;
|
|
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 */
|
|
/* thread information allocation */
|
|
#define alloc_thread_info(tsk) \
|
|
#define alloc_thread_info(tsk) \
|
|
((struct thread_info *) __get_free_pages(GFP_KERNEL, \
|
|
((struct thread_info *) __get_free_pages(GFP_KERNEL, \
|
|
CONFIG_KERNEL_STACK_ORDER))
|
|
CONFIG_KERNEL_STACK_ORDER))
|
|
|
|
+#endif
|
|
|
|
+
|
|
#define free_thread_info(ti) \
|
|
#define free_thread_info(ti) \
|
|
free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER)
|
|
free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER)
|
|
|
|
|