|
@@ -74,20 +74,14 @@ static inline struct thread_info *stack_thread_info(void)
|
|
|
|
|
|
/* thread information allocation */
|
|
/* thread information allocation */
|
|
#ifdef CONFIG_DEBUG_STACK_USAGE
|
|
#ifdef CONFIG_DEBUG_STACK_USAGE
|
|
-#define alloc_thread_info(tsk) \
|
|
|
|
- ({ \
|
|
|
|
- struct thread_info *ret; \
|
|
|
|
- \
|
|
|
|
- ret = ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)); \
|
|
|
|
- if (ret) \
|
|
|
|
- memset(ret, 0, THREAD_SIZE); \
|
|
|
|
- ret; \
|
|
|
|
- })
|
|
|
|
|
|
+#define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO)
|
|
#else
|
|
#else
|
|
-#define alloc_thread_info(tsk) \
|
|
|
|
- ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER))
|
|
|
|
|
|
+#define THREAD_FLAGS GFP_KERNEL
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#define alloc_thread_info(tsk) \
|
|
|
|
+ ((struct thread_info *) __get_free_pages(THREAD_FLAGS, THREAD_ORDER))
|
|
|
|
+
|
|
#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
|
|
#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
|
|
|
|
|
|
#else /* !__ASSEMBLY__ */
|
|
#else /* !__ASSEMBLY__ */
|