diff options
-rw-r--r-- | include/asm-blackfin/thread_info.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-blackfin/thread_info.h b/include/asm-blackfin/thread_info.h index fa8f08cf283e..34d3c2eec949 100644 --- a/include/asm-blackfin/thread_info.h +++ b/include/asm-blackfin/thread_info.h | |||
@@ -39,6 +39,11 @@ | |||
39 | */ | 39 | */ |
40 | #define ALIGN_PAGE_MASK 0xffffe000 | 40 | #define ALIGN_PAGE_MASK 0xffffe000 |
41 | 41 | ||
42 | /* | ||
43 | * Size of kernel stack for each process. This must be a power of 2... | ||
44 | */ | ||
45 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
46 | |||
42 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
43 | 48 | ||
44 | typedef unsigned long mm_segment_t; | 49 | typedef unsigned long mm_segment_t; |
@@ -76,11 +81,6 @@ struct thread_info { | |||
76 | #define init_thread_info (init_thread_union.thread_info) | 81 | #define init_thread_info (init_thread_union.thread_info) |
77 | #define init_stack (init_thread_union.stack) | 82 | #define init_stack (init_thread_union.stack) |
78 | 83 | ||
79 | /* | ||
80 | * Size of kernel stack for each process. This must be a power of 2... | ||
81 | */ | ||
82 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
83 | |||
84 | /* How to get the thread information struct from C */ | 84 | /* How to get the thread information struct from C */ |
85 | 85 | ||
86 | static inline struct thread_info *current_thread_info(void) | 86 | static inline struct thread_info *current_thread_info(void) |
@@ -94,7 +94,7 @@ static inline struct thread_info *current_thread_info(void) | |||
94 | struct thread_info *ti; | 94 | struct thread_info *ti; |
95 | __asm__("%0 = sp;": "=&d"(ti): | 95 | __asm__("%0 = sp;": "=&d"(ti): |
96 | ); | 96 | ); |
97 | return (struct thread_info *)((long)ti & ~8191UL); | 97 | return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1)); |
98 | } | 98 | } |
99 | 99 | ||
100 | /* thread information allocation */ | 100 | /* thread information allocation */ |