diff options
author | David A. Long <dave.long@linaro.org> | 2014-03-05 21:41:29 -0500 |
---|---|---|
committer | David A. Long <dave.long@linaro.org> | 2014-03-18 16:39:40 -0400 |
commit | b4cd605ca92d9a8a2f71355cb45dd943ebcb0c97 (patch) | |
tree | 01f6832e2d9f98344b5913efdb257447f4241742 /arch/arm/include | |
parent | 602cd2609eee92d338a83e400774e97c60535ba2 (diff) |
ARM: Make arch_specific_insn a define for new arch_probes_insn structure
Because the common underlying code for ARM kprobes and uprobes needs
to share a common architecrure-specific context structure, and because
the generic kprobes include file insists on defining this to a dummy
structure when kprobes is not configured, a new common structure is
required which can exist when uprobes is configured without kprobes.
In this case kprobes will define a dummy structure, but without the
define aliasing the two structure tags it will not affect uprobes and
the shared probes code.
Signed-off-by: David A. Long <dave.long@linaro.org>
Acked-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/kprobes.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/probes.h | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index 6e1046661f07..49fa0dfaad33 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h | |||
@@ -31,6 +31,8 @@ typedef u32 kprobe_opcode_t; | |||
31 | struct kprobe; | 31 | struct kprobe; |
32 | #include <asm/probes.h> | 32 | #include <asm/probes.h> |
33 | 33 | ||
34 | #define arch_specific_insn arch_probes_insn | ||
35 | |||
34 | struct prev_kprobe { | 36 | struct prev_kprobe { |
35 | struct kprobe *kp; | 37 | struct kprobe *kp; |
36 | unsigned int status; | 38 | unsigned int status; |
diff --git a/arch/arm/include/asm/probes.h b/arch/arm/include/asm/probes.h index c37252c73ee5..806cfe622a9e 100644 --- a/arch/arm/include/asm/probes.h +++ b/arch/arm/include/asm/probes.h | |||
@@ -21,18 +21,18 @@ | |||
21 | 21 | ||
22 | typedef u32 probes_opcode_t; | 22 | typedef u32 probes_opcode_t; |
23 | 23 | ||
24 | struct arch_specific_insn; | 24 | struct arch_probes_insn; |
25 | typedef void (probes_insn_handler_t)(probes_opcode_t, | 25 | typedef void (probes_insn_handler_t)(probes_opcode_t, |
26 | struct arch_specific_insn *, | 26 | struct arch_probes_insn *, |
27 | struct pt_regs *); | 27 | struct pt_regs *); |
28 | typedef unsigned long (probes_check_cc)(unsigned long); | 28 | typedef unsigned long (probes_check_cc)(unsigned long); |
29 | typedef void (probes_insn_singlestep_t)(probes_opcode_t, | 29 | typedef void (probes_insn_singlestep_t)(probes_opcode_t, |
30 | struct arch_specific_insn *, | 30 | struct arch_probes_insn *, |
31 | struct pt_regs *); | 31 | struct pt_regs *); |
32 | typedef void (probes_insn_fn_t)(void); | 32 | typedef void (probes_insn_fn_t)(void); |
33 | 33 | ||
34 | /* Architecture specific copy of original instruction. */ | 34 | /* Architecture specific copy of original instruction. */ |
35 | struct arch_specific_insn { | 35 | struct arch_probes_insn { |
36 | probes_opcode_t *insn; | 36 | probes_opcode_t *insn; |
37 | probes_insn_handler_t *insn_handler; | 37 | probes_insn_handler_t *insn_handler; |
38 | probes_check_cc *insn_check_cc; | 38 | probes_check_cc *insn_check_cc; |