ARM: Rename the shared kprobes/uprobe return value enum
authorDavid A. Long <dave.long@linaro.org>
Thu, 6 Mar 2014 02:23:42 +0000 (21:23 -0500)
committerDavid A. Long <dave.long@linaro.org>
Tue, 18 Mar 2014 20:39:38 +0000 (16:39 -0400)
Change the name of kprobes_insn to probes_insn so it can be shared between
kprobes and uprobes without confusion.

Signed-off-by: David A. Long <dave.long@linaro.org>
Acked-by: Jon Medhurst <tixy@linaro.org>
arch/arm/kernel/kprobes-common.c
arch/arm/kernel/kprobes-thumb.c
arch/arm/kernel/kprobes.h
arch/arm/kernel/probes-arm.c
arch/arm/kernel/probes-thumb.c
arch/arm/kernel/probes.h

index 08b55605c1ecfd0a68271db6695b9fd1e1897a4d..f151e15f566af4160cd1e8aee519647ffc1c1b68 100644 (file)
@@ -123,7 +123,7 @@ emulate_ldm_r3_15(probes_opcode_t insn,
        load_write_pc(regs->ARM_pc, regs);
 }
 
-enum kprobe_insn __kprobes
+enum probes_insn __kprobes
 kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *h)
 {
index 2a73330fb19f29cffe42a5daddec04d598031097..c271d5d2810c92f11c4e9764ac60545a41b6a1fb 100644 (file)
@@ -66,7 +66,7 @@ t32_simulate_cond_branch(probes_opcode_t insn,
        regs->ARM_pc = pc + (offset * 2);
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t32_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
@@ -142,11 +142,11 @@ t32_simulate_ldr_literal(probes_opcode_t insn,
        regs->uregs[rt] = rtv;
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t32_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
-       enum kprobe_insn ret = kprobe_decode_ldmstm(insn, asi, d);
+       enum probes_insn ret = kprobe_decode_ldmstm(insn, asi, d);
 
        /* Fixup modified instruction to have halfwords in correct order...*/
        insn = asi->insn[0];
@@ -402,7 +402,7 @@ t16_singlestep_it(probes_opcode_t insn,
        t16_simulate_it(insn, asi, regs);
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t16_decode_it(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
@@ -420,7 +420,7 @@ t16_simulate_cond_branch(probes_opcode_t insn,
        regs->ARM_pc = pc + (offset * 2);
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t16_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
@@ -510,7 +510,7 @@ t16_emulate_hiregs(probes_opcode_t insn,
        regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK);
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t16_decode_hiregs(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
@@ -538,7 +538,7 @@ t16_emulate_push(probes_opcode_t insn,
                );
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t16_decode_push(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
@@ -591,7 +591,7 @@ t16_emulate_pop_pc(probes_opcode_t insn,
        bx_write_pc(pc, regs);
 }
 
-static enum kprobe_insn __kprobes
+static enum probes_insn __kprobes
 t16_decode_pop(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *d)
 {
index e2ae4ed168cdee56d7029ac1d8f752a61351a9c3..3684fc9e27cc5c5feea03dacb4a11bd064dd9dab 100644 (file)
 struct decode_header;
 union decode_action;
 
-enum kprobe_insn {
-       INSN_REJECTED,
-       INSN_GOOD,
-       INSN_GOOD_NO_SLOT
-};
-
-typedef enum kprobe_insn (kprobe_decode_insn_t)(probes_opcode_t,
+typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
                                                struct arch_specific_insn *,
                                                const union decode_action *);
 
 #ifdef CONFIG_THUMB2_KERNEL
 
-enum kprobe_insn thumb16_kprobe_decode_insn(probes_opcode_t,
+enum probes_insn thumb16_kprobe_decode_insn(probes_opcode_t,
                                            struct arch_specific_insn *,
                                            const union decode_action *);
-enum kprobe_insn thumb32_kprobe_decode_insn(probes_opcode_t,
+enum probes_insn thumb32_kprobe_decode_insn(probes_opcode_t,
                                            struct arch_specific_insn *,
                                            const union decode_action *);
 
 #else /* !CONFIG_THUMB2_KERNEL */
 
-enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t,
+enum probes_insn arm_kprobe_decode_insn(probes_opcode_t,
                                        struct arch_specific_insn *,
                                        const union decode_action *);
 
index 3357a074597dfcef9dd8a7f249b1cca7c0a200d5..a9439e607ac09dcbb24df1eb10c3ef956a809cdf 100644 (file)
@@ -723,7 +723,7 @@ static void __kprobes arm_singlestep(probes_opcode_t insn,
  *   if the work was put into it, but low return considering they
  *   should also be very rare.
  */
-enum kprobe_insn __kprobes
+enum probes_insn __kprobes
 arm_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
                       const union decode_action *actions)
 {
index a15a79b7c9c5cc8aed1a897826889fa5beae4d95..d23ef009fe638f9838aeba3c42fcf5105bd0a024 100644 (file)
@@ -861,7 +861,7 @@ static void __kprobes thumb32_singlestep(probes_opcode_t opcode,
        regs->ARM_cpsr = it_advance(regs->ARM_cpsr);
 }
 
-enum kprobe_insn __kprobes
+enum probes_insn __kprobes
 thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
                           const union decode_action *actions)
 {
@@ -871,7 +871,7 @@ thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
                                  actions);
 }
 
-enum kprobe_insn __kprobes
+enum probes_insn __kprobes
 thumb32_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
                           const union decode_action *actions)
 {
index dedff8a5a92435745ef6acc7fe99e120d17618ca..870282a39261ec0d9540b585027e46c2d0892ff8 100644 (file)
@@ -138,7 +138,7 @@ void __kprobes probes_simulate_nop(probes_opcode_t, struct arch_specific_insn *,
 void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *,
                struct pt_regs *regs);
 
-enum kprobe_insn __kprobes
+enum probes_insn __kprobes
 kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
                const struct decode_header *h);
 
@@ -313,7 +313,7 @@ union decode_item {
        int                     action;
 };
 
-typedef enum kprobe_insn (probes_custom_decode_t)(probes_opcode_t,
+typedef enum probes_insn (probes_custom_decode_t)(probes_opcode_t,
                                                  struct arch_specific_insn *,
                                                  const struct decode_header *);
 
@@ -391,6 +391,11 @@ struct decode_or {
 #define DECODE_OR(_mask, _value)                               \
        DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0)
 
+enum probes_insn {
+       INSN_REJECTED,
+       INSN_GOOD,
+       INSN_GOOD_NO_SLOT
+};
 
 struct decode_reject {
        struct decode_header    header;
This page took 0.031976 seconds and 5 git commands to generate.