Skip to content

Commit

Permalink
ARM: kprobes: Add BLX macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Medhurst authored and Tixy committed Jul 13, 2011
1 parent df4fa1f commit 7be7ee2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/kernel/kprobes-arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@

#define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25)

#if __LINUX_ARM_ARCH__ >= 6
#define BLX(reg) "blx "reg" \n\t"
#else
#define BLX(reg) "mov lr, pc \n\t" \
"mov pc, "reg" \n\t"
#endif

#define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos))

#define PSR_fs (PSR_f|PSR_s)
Expand Down

0 comments on commit 7be7ee2

Please sign in to comment.