diff options
-rw-r--r-- | arch/um/include/asm/thread_info.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index e2cf786bda0a..5bd1bad33fab 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -49,7 +49,10 @@ static inline struct thread_info *current_thread_info(void) | |||
49 | { | 49 | { |
50 | struct thread_info *ti; | 50 | struct thread_info *ti; |
51 | unsigned long mask = THREAD_SIZE - 1; | 51 | unsigned long mask = THREAD_SIZE - 1; |
52 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); | 52 | void *p; |
53 | |||
54 | asm volatile ("" : "=r" (p) : "0" (&ti)); | ||
55 | ti = (struct thread_info *) (((unsigned long)p) & ~mask); | ||
53 | return ti; | 56 | return ti; |
54 | } | 57 | } |
55 | 58 | ||