diff options
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 380ac4f20000..9a4965ad6867 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -174,6 +174,16 @@ | |||
174 | restore_irqs_notrace \oldcpsr | 174 | restore_irqs_notrace \oldcpsr |
175 | .endm | 175 | .endm |
176 | 176 | ||
177 | /* | ||
178 | * Get current thread_info. | ||
179 | */ | ||
180 | .macro get_thread_info, rd | ||
181 | ARM( mov \rd, sp, lsr #13 ) | ||
182 | THUMB( mov \rd, sp ) | ||
183 | THUMB( lsr \rd, \rd, #13 ) | ||
184 | mov \rd, \rd, lsl #13 | ||
185 | .endm | ||
186 | |||
177 | #define USER(x...) \ | 187 | #define USER(x...) \ |
178 | 9999: x; \ | 188 | 9999: x; \ |
179 | .pushsection __ex_table,"a"; \ | 189 | .pushsection __ex_table,"a"; \ |