X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-um%2Fthread_info.h;h=6e5fd5c892d069439ed56191d837df54dd94dd58;hb=b7d331281488193621e255f47773e42f406b939d;hp=18a13ba746053eb8da1dc912fda5957d0dc57577;hpb=c14b84949e127560084c7c56b365931c71c60768;p=powerpc.git diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 18a13ba746..6e5fd5c892 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -52,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