]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-um/thread_info.h
ALSA: ASoC: Pass the DAI being configured into CPU DAI probe and remove
[linux-2.6-omap-h63xx.git] / include / asm-um / thread_info.h
index 261e2f4528f6a62e1f5dd94c41ff06d5405beeed..356b83e2c22edf07c357e91c46469ad762968fb2 100644 (file)
@@ -1,5 +1,5 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
+/*
+ * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
@@ -8,8 +8,9 @@
 
 #ifndef __ASSEMBLY__
 
-#include <asm/processor.h>
 #include <asm/types.h>
+#include <asm/page.h>
+#include <asm/uaccess.h>
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
@@ -22,6 +23,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 +37,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 +53,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
 
@@ -62,8 +76,8 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_SYSCALL_TRACE      0       /* syscall trace active */
 #define TIF_SIGPENDING         1       /* signal pending */
 #define TIF_NEED_RESCHED       2       /* rescheduling necessary */
-#define TIF_POLLING_NRFLAG      3       /* true if poll_idle() is polling 
-                                        * TIF_NEED_RESCHED 
+#define TIF_POLLING_NRFLAG      3       /* true if poll_idle() is polling
+                                        * TIF_NEED_RESCHED
                                         */
 #define TIF_RESTART_BLOCK      4
 #define TIF_MEMDIE             5