diff options
author | Jon Medhurst <tixy@yxit.co.uk> | 2011-06-10 15:29:04 -0400 |
---|---|---|
committer | Tixy <tixy@medhuaa1.miniserver.com> | 2011-07-13 13:32:45 -0400 |
commit | 263e368a2f1f960db07d7524a4a3e7df951f1f72 (patch) | |
tree | eb8b1ba0a5d07368de5bd65b579a5f69233ddb07 /arch/arm/kernel/kprobes-common.c | |
parent | f39ca8b488a6c1e8db47746e1cdb841a6999edd7 (diff) |
ARM: kprobes: Add load_write_pc()
This writes a value to PC which was obtained as the result of a
LDR or LDM instruction. For ARMv5T and later this must perform
interworking.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-common.c')
-rw-r--r-- | arch/arm/kernel/kprobes-common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c index 3a3e765d2090..86fdc4c4c2ce 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/kernel/kprobes-common.c | |||
@@ -45,9 +45,24 @@ void __init find_str_pc_offset(void) | |||
45 | #endif /* !find_str_pc_offset */ | 45 | #endif /* !find_str_pc_offset */ |
46 | 46 | ||
47 | 47 | ||
48 | #ifndef test_load_write_pc_interworking | ||
49 | |||
50 | bool load_write_pc_interworks; | ||
51 | |||
52 | void __init test_load_write_pc_interworking(void) | ||
53 | { | ||
54 | int arch = cpu_architecture(); | ||
55 | BUG_ON(arch == CPU_ARCH_UNKNOWN); | ||
56 | load_write_pc_interworks = arch >= CPU_ARCH_ARMv5T; | ||
57 | } | ||
58 | |||
59 | #endif /* !test_load_write_pc_interworking */ | ||
60 | |||
61 | |||
48 | void __init arm_kprobe_decode_init(void) | 62 | void __init arm_kprobe_decode_init(void) |
49 | { | 63 | { |
50 | find_str_pc_offset(); | 64 | find_str_pc_offset(); |
65 | test_load_write_pc_interworking(); | ||
51 | } | 66 | } |
52 | 67 | ||
53 | 68 | ||