summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/probes-arm.c
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2014-03-05 21:41:29 -0500
committerDavid A. Long <dave.long@linaro.org>2014-03-18 16:39:40 -0400
commitb4cd605ca92d9a8a2f71355cb45dd943ebcb0c97 (patch)
tree01f6832e2d9f98344b5913efdb257447f4241742 /arch/arm/kernel/probes-arm.c
parent602cd2609eee92d338a83e400774e97c60535ba2 (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/kernel/probes-arm.c')
-rw-r--r--arch/arm/kernel/probes-arm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/kernel/probes-arm.c b/arch/arm/kernel/probes-arm.c
index 8e7fde87652..51a13a02798 100644
--- a/arch/arm/kernel/probes-arm.c
+++ b/arch/arm/kernel/probes-arm.c
@@ -58,7 +58,7 @@
*/
void __kprobes simulate_bbl(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
long iaddr = (long) regs->ARM_pc - 4;
int disp = branch_displacement(insn);
@@ -70,7 +70,7 @@ void __kprobes simulate_bbl(probes_opcode_t insn,
}
void __kprobes simulate_blx1(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
long iaddr = (long) regs->ARM_pc - 4;
int disp = branch_displacement(insn);
@@ -81,7 +81,7 @@ void __kprobes simulate_blx1(probes_opcode_t insn,
}
void __kprobes simulate_blx2bx(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
int rm = insn & 0xf;
long rmv = regs->uregs[rm];
@@ -96,7 +96,7 @@ void __kprobes simulate_blx2bx(probes_opcode_t insn,
}
void __kprobes simulate_mrs(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
int rd = (insn >> 12) & 0xf;
unsigned long mask = 0xf8ff03df; /* Mask out execution state */
@@ -104,7 +104,7 @@ void __kprobes simulate_mrs(probes_opcode_t insn,
}
void __kprobes simulate_mov_ipsp(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
regs->uregs[12] = regs->uregs[13];
}
@@ -705,7 +705,7 @@ EXPORT_SYMBOL_GPL(probes_decode_arm_table);
#endif
static void __kprobes arm_singlestep(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
regs->ARM_pc += 4;
asi->insn_handler(insn, asi, regs);
@@ -724,7 +724,7 @@ static void __kprobes arm_singlestep(probes_opcode_t insn,
* should also be very rare.
*/
enum probes_insn __kprobes
-arm_probes_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
+arm_probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi,
bool emulate, const union decode_action *actions)
{
asi->insn_singlestep = arm_singlestep;