]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-xtensa/thread_info.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6-omap-h63xx.git] / include / asm-xtensa / thread_info.h
index 3fa29799b435302e3ca7ddfd4131c4f51d6b2545..0f4fe1faf9ba46fed7f9c689f2bb2652fe25923b 100644 (file)
 
 #ifndef __ASSEMBLY__
 
+#if XTENSA_HAVE_COPROCESSORS
+
+typedef struct xtregs_coprocessor {
+       xtregs_cp0_t cp0;
+       xtregs_cp1_t cp1;
+       xtregs_cp2_t cp2;
+       xtregs_cp3_t cp3;
+       xtregs_cp4_t cp4;
+       xtregs_cp5_t cp5;
+       xtregs_cp6_t cp6;
+       xtregs_cp7_t cp7;
+} xtregs_coprocessor_t;
+
+#endif
+
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
        struct exec_domain      *exec_domain;   /* execution domain */
@@ -38,7 +53,13 @@ struct thread_info {
        mm_segment_t            addr_limit;     /* thread address space */
        struct restart_block    restart_block;
 
+       unsigned long           cpenable;
 
+       /* Allocate storage for extra user states and coprocessor states. */
+#if XTENSA_HAVE_COPROCESSORS
+       xtregs_coprocessor_t    xtregs_cp;
+#endif
+       xtregs_user_t           xtregs_user;
 };
 
 #else /* !__ASSEMBLY__ */
@@ -90,10 +111,6 @@ static inline struct thread_info *current_thread_info(void)
        return ti;
 }
 
-/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
-
 #else /* !__ASSEMBLY__ */
 
 /* how to get the thread information struct from ASM */
@@ -110,23 +127,23 @@ static inline struct thread_info *current_thread_info(void)
  * - other flags in MSW
  */
 #define TIF_SYSCALL_TRACE      0       /* syscall trace active */
-#define TIF_NOTIFY_RESUME      1       /* resumption notification requested */
-#define TIF_SIGPENDING         2       /* signal pending */
-#define TIF_NEED_RESCHED       3       /* rescheduling necessary */
-#define TIF_SINGLESTEP         4       /* restore singlestep on return to user mode */
-#define TIF_IRET               5       /* return with iret */
-#define TIF_MEMDIE             6
-#define TIF_RESTORE_SIGMASK    7       /* restore signal mask in do_signal() */
+#define TIF_SIGPENDING         1       /* signal pending */
+#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_SINGLESTEP         3       /* restore singlestep on return to user mode */
+#define TIF_IRET               4       /* return with iret */
+#define TIF_MEMDIE             5
+#define TIF_RESTORE_SIGMASK    6       /* restore signal mask in do_signal() */
 #define TIF_POLLING_NRFLAG     16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_FREEZE             17      /* is freezing for suspend */
 
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
-#define _TIF_NOTIFY_RESUME     (1<<TIF_NOTIFY_RESUME)
 #define _TIF_SIGPENDING                (1<<TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED      (1<<TIF_NEED_RESCHED)
 #define _TIF_SINGLESTEP                (1<<TIF_SINGLESTEP)
 #define _TIF_IRET              (1<<TIF_IRET)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
 #define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE            (1<<TIF_FREEZE)
 
 #define _TIF_WORK_MASK         0x0000FFFE      /* work to do on interrupt/exception return */
 #define _TIF_ALLWORK_MASK      0x0000FFFF      /* work to do on any return to u-space */
@@ -141,6 +158,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TS_USEDFPU             0x0001  /* FPU was used by this task this quantum (SMP) */
 
 #define THREAD_SIZE 8192       //(2*PAGE_SIZE)
+#define THREAD_SIZE_ORDER 1
 
 #endif /* __KERNEL__ */
 #endif /* _XTENSA_THREAD_INFO */