diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-07-07 09:03:08 -0400 |
---|---|---|
committer | Tixy <tixy@medhuaa1.miniserver.com> | 2011-07-13 13:32:48 -0400 |
commit | 7be7ee2d295f6a069e1e92db95bf92eea2a173cf (patch) | |
tree | 510fae54b9554bbef9a8e8d1443c11b1985dadba /arch/arm/kernel | |
parent | df4fa1f8dde23db25f50e49535d2c7db0005f9ad (diff) |
ARM: kprobes: Add BLX macro
This is for use by inline assembler which will be added to kprobes-arm.c
It saves memory when used on newer ARM architectures and also provides
correct interworking should ARM probes be required on Thumb kernels in
the future.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/kprobes-arm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c index ea96214ef341..80a941100f8c 100644 --- a/arch/arm/kernel/kprobes-arm.c +++ b/arch/arm/kernel/kprobes-arm.c | |||
@@ -67,6 +67,13 @@ | |||
67 | 67 | ||
68 | #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) | 68 | #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) |
69 | 69 | ||
70 | #if __LINUX_ARM_ARCH__ >= 6 | ||
71 | #define BLX(reg) "blx "reg" \n\t" | ||
72 | #else | ||
73 | #define BLX(reg) "mov lr, pc \n\t" \ | ||
74 | "mov pc, "reg" \n\t" | ||
75 | #endif | ||
76 | |||
70 | #define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos)) | 77 | #define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos)) |
71 | 78 | ||
72 | #define PSR_fs (PSR_f|PSR_s) | 79 | #define PSR_fs (PSR_f|PSR_s) |