diff options
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 57f0584e8d97..f67fd3afebdf 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <asm/domain.h> | 24 | #include <asm/domain.h> |
25 | #include <asm/opcodes-virt.h> | 25 | #include <asm/opcodes-virt.h> |
26 | #include <asm/asm-offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | #include <asm/page.h> | ||
28 | #include <asm/thread_info.h> | ||
27 | 29 | ||
28 | #define IOMEM(x) (x) | 30 | #define IOMEM(x) (x) |
29 | 31 | ||
@@ -179,10 +181,10 @@ | |||
179 | * Get current thread_info. | 181 | * Get current thread_info. |
180 | */ | 182 | */ |
181 | .macro get_thread_info, rd | 183 | .macro get_thread_info, rd |
182 | ARM( mov \rd, sp, lsr #13 ) | 184 | ARM( mov \rd, sp, lsr #THREAD_SIZE_ORDER + PAGE_SHIFT ) |
183 | THUMB( mov \rd, sp ) | 185 | THUMB( mov \rd, sp ) |
184 | THUMB( lsr \rd, \rd, #13 ) | 186 | THUMB( lsr \rd, \rd, #THREAD_SIZE_ORDER + PAGE_SHIFT ) |
185 | mov \rd, \rd, lsl #13 | 187 | mov \rd, \rd, lsl #THREAD_SIZE_ORDER + PAGE_SHIFT |
186 | .endm | 188 | .endm |
187 | 189 | ||
188 | /* | 190 | /* |
@@ -425,4 +427,25 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) | |||
425 | #endif | 427 | #endif |
426 | .endm | 428 | .endm |
427 | 429 | ||
430 | .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo | ||
431 | .macro ret\c, reg | ||
432 | #if __LINUX_ARM_ARCH__ < 6 | ||
433 | mov\c pc, \reg | ||
434 | #else | ||
435 | .ifeqs "\reg", "lr" | ||
436 | bx\c \reg | ||
437 | .else | ||
438 | mov\c pc, \reg | ||
439 | .endif | ||
440 | #endif | ||
441 | .endm | ||
442 | .endr | ||
443 | |||
444 | .macro ret.w, reg | ||
445 | ret \reg | ||
446 | #ifdef CONFIG_THUMB2_KERNEL | ||
447 | nop | ||
448 | #endif | ||
449 | .endm | ||
450 | |||
428 | #endif /* __ASM_ASSEMBLER_H__ */ | 451 | #endif /* __ASM_ASSEMBLER_H__ */ |