]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/thread_info.h
x86: fix CONFIG_KEXEC build breakage
[linux-2.6-omap-h63xx.git] / include / asm-sh / thread_info.h
index 879f741105dbd366ed1bbcfdec6570024ae47662..1f7e1deb8d924bf3efc0be3035503ab7bbcb77ef 100644 (file)
@@ -32,12 +32,20 @@ struct thread_info {
 
 #define PREEMPT_ACTIVE         0x10000000
 
-#ifdef CONFIG_4KSTACKS
-#define THREAD_SIZE            (PAGE_SIZE)
+#if defined(CONFIG_4KSTACKS)
+#define THREAD_SIZE_ORDER      (0)
+#elif defined(CONFIG_PAGE_SIZE_4KB)
+#define THREAD_SIZE_ORDER      (1)
+#elif defined(CONFIG_PAGE_SIZE_8KB)
+#define THREAD_SIZE_ORDER      (1)
+#elif defined(CONFIG_PAGE_SIZE_64KB)
+#define THREAD_SIZE_ORDER      (0)
 #else
-#define THREAD_SIZE            (PAGE_SIZE * 2)
+#error "Unknown thread size"
 #endif
-#define STACK_WARN             (THREAD_SIZE / 8)
+
+#define THREAD_SIZE    (PAGE_SIZE << THREAD_SIZE_ORDER)
+#define STACK_WARN     (THREAD_SIZE >> 3)
 
 /*
  * macros/functions for gaining access to the thread information structure
@@ -99,20 +107,20 @@ 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_RESTORE_SIGMASK    4       /* restore signal mask in do_signal() */
+#define TIF_SIGPENDING         1       /* signal pending */
+#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
+#define TIF_RESTORE_SIGMASK    3       /* restore signal mask in do_signal() */
+#define TIF_SINGLESTEP         4       /* singlestepping active */
 #define TIF_USEDFPU            16      /* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG     17      /* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_MEMDIE             18
 #define TIF_FREEZE             19
 
 #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_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_SINGLESTEP                (1<<TIF_SINGLESTEP)
 #define _TIF_USEDFPU           (1<<TIF_USEDFPU)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
 #define _TIF_FREEZE            (1<<TIF_FREEZE)