summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-arm.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-07-07 10:21:40 +0100
committerTixy <tixy@medhuaa1.miniserver.com>2011-07-13 17:32:41 +0000
commit6c8df3300f60cae54aeb2a6dda8efe7ffe16a322 (patch)
treec7cac1abd0d5a46db1a4b4b3785238874822218b /arch/arm/kernel/kprobes-arm.c
parent1b59d874660be7f790861ad849858cc009089515 (diff)
downloadop-kernel-dev-6c8df3300f60cae54aeb2a6dda8efe7ffe16a322.zip
op-kernel-dev-6c8df3300f60cae54aeb2a6dda8efe7ffe16a322.tar.gz
ARM: kprobes: Move find_str_pc_offset into kprobes-common.c
Move str_pc_offset into kprobes-common.c as it will be needed by common code later. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-arm.c')
-rw-r--r--arch/arm/kernel/kprobes-arm.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/arch/arm/kernel/kprobes-arm.c b/arch/arm/kernel/kprobes-arm.c
index 3c4678e..0262b29 100644
--- a/arch/arm/kernel/kprobes-arm.c
+++ b/arch/arm/kernel/kprobes-arm.c
@@ -92,29 +92,6 @@ union reg_pair {
};
/*
- * For STR and STM instructions, an ARM core may choose to use either
- * a +8 or a +12 displacement from the current instruction's address.
- * Whichever value is chosen for a given core, it must be the same for
- * both instructions and may not change. This function measures it.
- */
-
-static int str_pc_offset;
-
-static void __init find_str_pc_offset(void)
-{
- int addr, scratch, ret;
-
- __asm__ (
- "sub %[ret], pc, #4 \n\t"
- "str pc, %[addr] \n\t"
- "ldr %[scr], %[addr] \n\t"
- "sub %[ret], %[scr], %[ret] \n\t"
- : [ret] "=r" (ret), [scr] "=r" (scratch), [addr] "+m" (addr));
-
- str_pc_offset = ret;
-}
-
-/*
* The insnslot_?arg_r[w]flags() functions below are to keep the
* msr -> *fn -> mrs instruction sequences indivisible so that
* the state of the CPSR flags aren't inadvertently modified
@@ -1569,8 +1546,3 @@ arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi)
return space_cccc_11xx(insn, asi);
}
-
-void __init arm_kprobe_decode_init(void)
-{
- find_str_pc_offset();
-}
OpenPOWER on IntegriCloud