From 149c79a9f3f5de7326dbe07df76f88611737e56f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 25 Jul 2007 10:25:29 +0800 Subject: [PATCH] --- yaml --- r: 63083 b: refs/heads/master c: 12a7991180f44e7d993a3a0a442890fc3de67f57 h: refs/heads/master i: 63081: c9dbeb4ac05e1f309b4c150a4ef75940d55bea30 63079: 76f3e33dd3c4a2cee244b2655ea879aed98a09d8 v: v3 --- [refs] | 2 +- trunk/include/asm-blackfin/thread_info.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 0f6ee75a75c7..e7488d4b4c99 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0fa63ad7d1450a7ea2b5e5f60bbc64f5ed5a5adc +refs/heads/master: 12a7991180f44e7d993a3a0a442890fc3de67f57 diff --git a/trunk/include/asm-blackfin/thread_info.h b/trunk/include/asm-blackfin/thread_info.h index fa8f08cf283e..34d3c2eec949 100644 --- a/trunk/include/asm-blackfin/thread_info.h +++ b/trunk/include/asm-blackfin/thread_info.h @@ -39,6 +39,11 @@ */ #define ALIGN_PAGE_MASK 0xffffe000 +/* + * Size of kernel stack for each process. This must be a power of 2... + */ +#define THREAD_SIZE 8192 /* 2 pages */ + #ifndef __ASSEMBLY__ typedef unsigned long mm_segment_t; @@ -76,11 +81,6 @@ struct thread_info { #define init_thread_info (init_thread_union.thread_info) #define init_stack (init_thread_union.stack) -/* - * Size of kernel stack for each process. This must be a power of 2... - */ -#define THREAD_SIZE 8192 /* 2 pages */ - /* How to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) @@ -94,7 +94,7 @@ static inline struct thread_info *current_thread_info(void) struct thread_info *ti; __asm__("%0 = sp;": "=&d"(ti): ); - return (struct thread_info *)((long)ti & ~8191UL); + return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1)); } /* thread information allocation */