aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/thread_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/thread_info.h')
-rw-r--r--arch/arm/include/asm/thread_info.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index ce73ab635414..d890e41f5520 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -90,14 +90,19 @@ struct thread_info {
90#define init_stack (init_thread_union.stack) 90#define init_stack (init_thread_union.stack)
91 91
92/* 92/*
93 * how to get the current stack pointer in C
94 */
95register unsigned long current_stack_pointer asm ("sp");
96
97/*
93 * how to get the thread information struct from C 98 * how to get the thread information struct from C
94 */ 99 */
95static inline struct thread_info *current_thread_info(void) __attribute_const__; 100static inline struct thread_info *current_thread_info(void) __attribute_const__;
96 101
97static inline struct thread_info *current_thread_info(void) 102static inline struct thread_info *current_thread_info(void)
98{ 103{
99 register unsigned long sp asm ("sp"); 104 return (struct thread_info *)
100 return (struct thread_info *)(sp & ~(THREAD_SIZE - 1)); 105 (current_stack_pointer & ~(THREAD_SIZE - 1));
101} 106}
102 107
103#define thread_saved_pc(tsk) \ 108#define thread_saved_pc(tsk) \