Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-m68knommu / thread_info.h
index cedf441..b8f009e 100644 (file)
 
 #ifndef __ASSEMBLY__
 
+/*
+ * Size of kernel stack for each process. This must be a power of 2...
+ */
+#ifdef CONFIG_4KSTACKS
+#define THREAD_SIZE_ORDER (0)
+#else
+#define THREAD_SIZE_ORDER (1)
+#endif
+                                                                                
+/*
+ * for asm files, THREAD_SIZE is now generated by asm-offsets.c
+ */
+#define THREAD_SIZE (PAGE_SIZE<<THREAD_SIZE_ORDER)
+
 /*
  * low level task data.
- * If you change this, change the TI_* offsets below to match.
  */
 struct thread_info {
        struct task_struct *task;               /* main task structure */
        struct exec_domain *exec_domain;        /* execution domain */
        unsigned long      flags;               /* low level flags */
        int                cpu;                 /* cpu we're on */
-       int                preempt_count;       /* 0 => preemptable, <0 => BUG*/
+       int                preempt_count;       /* 0 => preemptable, <0 => BUG */
        struct restart_block restart_block;
 };
 
@@ -60,20 +73,10 @@ static inline struct thread_info *current_thread_info(void)
 
 /* 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)
-#define get_thread_info(ti)    get_task_struct((ti)->task)
-#define put_thread_info(ti)    put_task_struct((ti)->task)
+                               __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER))
+#define free_thread_info(ti)   free_pages((unsigned long) (ti), THREAD_SIZE_ORDER)
 #endif /* __ASSEMBLY__ */
 
-/*
- * Offsets in thread_info structure, used in assembly code
- */
-#define TI_TASK                0
-#define TI_EXECDOMAIN  4
-#define TI_FLAGS       8
-#define TI_CPU         12
-
 #define        PREEMPT_ACTIVE  0x4000000
 
 /*