]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/thread_info.h
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / include / asm-sh / thread_info.h
index 605259f88113efda4e71f2a9bd1005d00b5c8f2b..0c01dc550819e865f52b8c135797220abecce60c 100644 (file)
@@ -9,8 +9,8 @@
  *  Copyright (C) 2002  David Howells (dhowells@redhat.com)
  *  - Incorporating suggestions made by Linus Torvalds and Dave Miller
  */
-
 #ifdef __KERNEL__
+#include <asm/page.h>
 
 #ifndef __ASSEMBLY__
 #include <asm/processor.h>
@@ -23,13 +23,20 @@ struct thread_info {
        int                     preempt_count; /* 0 => preemptable, <0 => BUG */
        mm_segment_t            addr_limit;     /* thread address space */
        struct restart_block    restart_block;
+       unsigned long           previous_sp;    /* sp of previous stack in case
+                                                  of nested IRQ stacks */
        __u8                    supervisor_stack[0];
 };
 
 #endif
 
 #define PREEMPT_ACTIVE         0x10000000
+
+#ifdef CONFIG_4KSTACKS
+#define THREAD_SIZE            (PAGE_SIZE)
+#else
 #define THREAD_SIZE            (PAGE_SIZE * 2)
+#endif
 #define STACK_WARN             (THREAD_SIZE / 8)
 
 /*
@@ -52,6 +59,9 @@ struct thread_info {
 #define init_thread_info       (init_thread_union.thread_info)
 #define init_stack             (init_thread_union.stack)
 
+/* how to get the current stack pointer from C */
+register unsigned long current_stack_pointer asm("r15") __attribute_used__;
+
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
 {
@@ -80,13 +90,7 @@ static inline struct thread_info *current_thread_info(void)
 #endif
 #define free_thread_info(ti)   kfree(ti)
 
-#else /* !__ASSEMBLY__ */
-
-/* how to get the thread information struct from ASM */
-#define GET_THREAD_INFO(reg) \
-       stc     r7_bank, reg
-
-#endif
+#endif /* __ASSEMBLY__ */
 
 /*
  * thread information flags