aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/probes-thumb.c
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2014-03-07 11:19:32 -0500
committerDavid A. Long <dave.long@linaro.org>2014-03-18 16:39:37 -0400
commit7579f4b3764337b39087d10496af0e741cbfe570 (patch)
tree009a68f8615a04fa038874522493006c2efb8022 /arch/arm/kernel/probes-thumb.c
parent3e6cd394bb10c2d65322e5f5d2ff0a9074d903a1 (diff)
ARM: Remove use of struct kprobe from generic probes code
Change the generic ARM probes code to pass in the opcode and architecture-specific structure separately instead of using struct kprobe, so we do not pollute code being used only for uprobes or other non-kprobes instruction interpretation. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/kernel/probes-thumb.c')
-rw-r--r--arch/arm/kernel/probes-thumb.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/kernel/probes-thumb.c b/arch/arm/kernel/probes-thumb.c
index 2abe8ceeb670..aa3176da1b29 100644
--- a/arch/arm/kernel/probes-thumb.c
+++ b/arch/arm/kernel/probes-thumb.c
@@ -10,10 +10,9 @@
10 10
11#include <linux/stddef.h> 11#include <linux/stddef.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/kprobes.h>
14#include <linux/module.h> 13#include <linux/module.h>
15 14
16#include "kprobes.h" 15#include "probes.h"
17#include "probes-thumb.h" 16#include "probes-thumb.h"
18 17
19 18
@@ -844,17 +843,21 @@ static unsigned long __kprobes thumb_check_cc(unsigned long cpsr)
844 return true; 843 return true;
845} 844}
846 845
847static void __kprobes thumb16_singlestep(struct kprobe *p, struct pt_regs *regs) 846static void __kprobes thumb16_singlestep(kprobe_opcode_t opcode,
847 struct arch_specific_insn *asi,
848 struct pt_regs *regs)
848{ 849{
849 regs->ARM_pc += 2; 850 regs->ARM_pc += 2;
850 p->ainsn.insn_handler(p, regs); 851 asi->insn_handler(opcode, asi, regs);
851 regs->ARM_cpsr = it_advance(regs->ARM_cpsr); 852 regs->ARM_cpsr = it_advance(regs->ARM_cpsr);
852} 853}
853 854
854static void __kprobes thumb32_singlestep(struct kprobe *p, struct pt_regs *regs) 855static void __kprobes thumb32_singlestep(kprobe_opcode_t opcode,
856 struct arch_specific_insn *asi,
857 struct pt_regs *regs)
855{ 858{
856 regs->ARM_pc += 4; 859 regs->ARM_pc += 4;
857 p->ainsn.insn_handler(p, regs); 860 asi->insn_handler(opcode, asi, regs);
858 regs->ARM_cpsr = it_advance(regs->ARM_cpsr); 861 regs->ARM_cpsr = it_advance(regs->ARM_cpsr);
859} 862}
860 863