diff options
author | David A. Long <dave.long@linaro.org> | 2014-03-05 21:23:42 -0500 |
---|---|---|
committer | David A. Long <dave.long@linaro.org> | 2014-03-18 16:39:38 -0400 |
commit | 44a0a59c535004eac9f18210cb2ce10b23861630 (patch) | |
tree | 7671e87de628e95118d9bb9391fd24334639d007 /arch/arm/kernel | |
parent | eb73ea97e63bb06bf98ff052615ce181bc7f69ec (diff) |
ARM: Rename the shared kprobes/uprobe return value enum
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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/kprobes-common.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/kprobes-thumb.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/kprobes.h | 14 | ||||
-rw-r--r-- | arch/arm/kernel/probes-arm.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/probes-thumb.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/probes.h | 9 |
6 files changed, 23 insertions, 24 deletions
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c index 08b55605c1ec..f151e15f566a 100644 --- a/arch/arm/kernel/kprobes-common.c +++ b/arch/arm/kernel/kprobes-common.c | |||
@@ -123,7 +123,7 @@ emulate_ldm_r3_15(probes_opcode_t insn, | |||
123 | load_write_pc(regs->ARM_pc, regs); | 123 | load_write_pc(regs->ARM_pc, regs); |
124 | } | 124 | } |
125 | 125 | ||
126 | enum kprobe_insn __kprobes | 126 | enum probes_insn __kprobes |
127 | kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, | 127 | kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, |
128 | const struct decode_header *h) | 128 | const struct decode_header *h) |
129 | { | 129 | { |
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index 2a73330fb19f..c271d5d2810c 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c | |||
@@ -66,7 +66,7 @@ t32_simulate_cond_branch(probes_opcode_t insn, | |||
66 | regs->ARM_pc = pc + (offset * 2); | 66 | regs->ARM_pc = pc + (offset * 2); |
67 | } | 67 | } |
68 | 68 | ||
69 | static enum kprobe_insn __kprobes | 69 | static enum probes_insn __kprobes |
70 | t32_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, | 70 | t32_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, |
71 | const struct decode_header *d) | 71 | const struct decode_header *d) |
72 | { | 72 | { |
@@ -142,11 +142,11 @@ t32_simulate_ldr_literal(probes_opcode_t insn, | |||
142 | regs->uregs[rt] = rtv; | 142 | regs->uregs[rt] = rtv; |
143 | } | 143 | } |
144 | 144 | ||
145 | static enum kprobe_insn __kprobes | 145 | static enum probes_insn __kprobes |
146 | t32_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, | 146 | t32_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, |
147 | const struct decode_header *d) | 147 | const struct decode_header *d) |
148 | { | 148 | { |
149 | enum kprobe_insn ret = kprobe_decode_ldmstm(insn, asi, d); | 149 | enum probes_insn ret = kprobe_decode_ldmstm(insn, asi, d); |
150 | 150 | ||
151 | /* Fixup modified instruction to have halfwords in correct order...*/ | 151 | /* Fixup modified instruction to have halfwords in correct order...*/ |
152 | insn = asi->insn[0]; | 152 | insn = asi->insn[0]; |
@@ -402,7 +402,7 @@ t16_singlestep_it(probes_opcode_t insn, | |||
402 | t16_simulate_it(insn, asi, regs); | 402 | t16_simulate_it(insn, asi, regs); |
403 | } | 403 | } |
404 | 404 | ||
405 | static enum kprobe_insn __kprobes | 405 | static enum probes_insn __kprobes |
406 | t16_decode_it(probes_opcode_t insn, struct arch_specific_insn *asi, | 406 | t16_decode_it(probes_opcode_t insn, struct arch_specific_insn *asi, |
407 | const struct decode_header *d) | 407 | const struct decode_header *d) |
408 | { | 408 | { |
@@ -420,7 +420,7 @@ t16_simulate_cond_branch(probes_opcode_t insn, | |||
420 | regs->ARM_pc = pc + (offset * 2); | 420 | regs->ARM_pc = pc + (offset * 2); |
421 | } | 421 | } |
422 | 422 | ||
423 | static enum kprobe_insn __kprobes | 423 | static enum probes_insn __kprobes |
424 | t16_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, | 424 | t16_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, |
425 | const struct decode_header *d) | 425 | const struct decode_header *d) |
426 | { | 426 | { |
@@ -510,7 +510,7 @@ t16_emulate_hiregs(probes_opcode_t insn, | |||
510 | regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); | 510 | regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); |
511 | } | 511 | } |
512 | 512 | ||
513 | static enum kprobe_insn __kprobes | 513 | static enum probes_insn __kprobes |
514 | t16_decode_hiregs(probes_opcode_t insn, struct arch_specific_insn *asi, | 514 | t16_decode_hiregs(probes_opcode_t insn, struct arch_specific_insn *asi, |
515 | const struct decode_header *d) | 515 | const struct decode_header *d) |
516 | { | 516 | { |
@@ -538,7 +538,7 @@ t16_emulate_push(probes_opcode_t insn, | |||
538 | ); | 538 | ); |
539 | } | 539 | } |
540 | 540 | ||
541 | static enum kprobe_insn __kprobes | 541 | static enum probes_insn __kprobes |
542 | t16_decode_push(probes_opcode_t insn, struct arch_specific_insn *asi, | 542 | t16_decode_push(probes_opcode_t insn, struct arch_specific_insn *asi, |
543 | const struct decode_header *d) | 543 | const struct decode_header *d) |
544 | { | 544 | { |
@@ -591,7 +591,7 @@ t16_emulate_pop_pc(probes_opcode_t insn, | |||
591 | bx_write_pc(pc, regs); | 591 | bx_write_pc(pc, regs); |
592 | } | 592 | } |
593 | 593 | ||
594 | static enum kprobe_insn __kprobes | 594 | static enum probes_insn __kprobes |
595 | t16_decode_pop(probes_opcode_t insn, struct arch_specific_insn *asi, | 595 | t16_decode_pop(probes_opcode_t insn, struct arch_specific_insn *asi, |
596 | const struct decode_header *d) | 596 | const struct decode_header *d) |
597 | { | 597 | { |
diff --git a/arch/arm/kernel/kprobes.h b/arch/arm/kernel/kprobes.h index e2ae4ed168cd..3684fc9e27cc 100644 --- a/arch/arm/kernel/kprobes.h +++ b/arch/arm/kernel/kprobes.h | |||
@@ -30,28 +30,22 @@ | |||
30 | struct decode_header; | 30 | struct decode_header; |
31 | union decode_action; | 31 | union decode_action; |
32 | 32 | ||
33 | enum kprobe_insn { | 33 | typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t, |
34 | INSN_REJECTED, | ||
35 | INSN_GOOD, | ||
36 | INSN_GOOD_NO_SLOT | ||
37 | }; | ||
38 | |||
39 | typedef enum kprobe_insn (kprobe_decode_insn_t)(probes_opcode_t, | ||
40 | struct arch_specific_insn *, | 34 | struct arch_specific_insn *, |
41 | const union decode_action *); | 35 | const union decode_action *); |
42 | 36 | ||
43 | #ifdef CONFIG_THUMB2_KERNEL | 37 | #ifdef CONFIG_THUMB2_KERNEL |
44 | 38 | ||
45 | enum kprobe_insn thumb16_kprobe_decode_insn(probes_opcode_t, | 39 | enum probes_insn thumb16_kprobe_decode_insn(probes_opcode_t, |
46 | struct arch_specific_insn *, | 40 | struct arch_specific_insn *, |
47 | const union decode_action *); | 41 | const union decode_action *); |
48 | enum kprobe_insn thumb32_kprobe_decode_insn(probes_opcode_t, | 42 | enum probes_insn thumb32_kprobe_decode_insn(probes_opcode_t, |
49 | struct arch_specific_insn *, | 43 | struct arch_specific_insn *, |
50 | const union decode_action *); | 44 | const union decode_action *); |
51 | 45 | ||
52 | #else /* !CONFIG_THUMB2_KERNEL */ | 46 | #else /* !CONFIG_THUMB2_KERNEL */ |
53 | 47 | ||
54 | enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t, | 48 | enum probes_insn arm_kprobe_decode_insn(probes_opcode_t, |
55 | struct arch_specific_insn *, | 49 | struct arch_specific_insn *, |
56 | const union decode_action *); | 50 | const union decode_action *); |
57 | 51 | ||
diff --git a/arch/arm/kernel/probes-arm.c b/arch/arm/kernel/probes-arm.c index 3357a074597d..a9439e607ac0 100644 --- a/arch/arm/kernel/probes-arm.c +++ b/arch/arm/kernel/probes-arm.c | |||
@@ -723,7 +723,7 @@ static void __kprobes arm_singlestep(probes_opcode_t insn, | |||
723 | * if the work was put into it, but low return considering they | 723 | * if the work was put into it, but low return considering they |
724 | * should also be very rare. | 724 | * should also be very rare. |
725 | */ | 725 | */ |
726 | enum kprobe_insn __kprobes | 726 | enum probes_insn __kprobes |
727 | arm_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, | 727 | arm_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, |
728 | const union decode_action *actions) | 728 | const union decode_action *actions) |
729 | { | 729 | { |
diff --git a/arch/arm/kernel/probes-thumb.c b/arch/arm/kernel/probes-thumb.c index a15a79b7c9c5..d23ef009fe63 100644 --- a/arch/arm/kernel/probes-thumb.c +++ b/arch/arm/kernel/probes-thumb.c | |||
@@ -861,7 +861,7 @@ static void __kprobes thumb32_singlestep(probes_opcode_t opcode, | |||
861 | regs->ARM_cpsr = it_advance(regs->ARM_cpsr); | 861 | regs->ARM_cpsr = it_advance(regs->ARM_cpsr); |
862 | } | 862 | } |
863 | 863 | ||
864 | enum kprobe_insn __kprobes | 864 | enum probes_insn __kprobes |
865 | thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, | 865 | thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, |
866 | const union decode_action *actions) | 866 | const union decode_action *actions) |
867 | { | 867 | { |
@@ -871,7 +871,7 @@ thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, | |||
871 | actions); | 871 | actions); |
872 | } | 872 | } |
873 | 873 | ||
874 | enum kprobe_insn __kprobes | 874 | enum probes_insn __kprobes |
875 | thumb32_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, | 875 | thumb32_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, |
876 | const union decode_action *actions) | 876 | const union decode_action *actions) |
877 | { | 877 | { |
diff --git a/arch/arm/kernel/probes.h b/arch/arm/kernel/probes.h index dedff8a5a924..870282a39261 100644 --- a/arch/arm/kernel/probes.h +++ b/arch/arm/kernel/probes.h | |||
@@ -138,7 +138,7 @@ void __kprobes probes_simulate_nop(probes_opcode_t, struct arch_specific_insn *, | |||
138 | void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *, | 138 | void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *, |
139 | struct pt_regs *regs); | 139 | struct pt_regs *regs); |
140 | 140 | ||
141 | enum kprobe_insn __kprobes | 141 | enum probes_insn __kprobes |
142 | kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, | 142 | kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, |
143 | const struct decode_header *h); | 143 | const struct decode_header *h); |
144 | 144 | ||
@@ -313,7 +313,7 @@ union decode_item { | |||
313 | int action; | 313 | int action; |
314 | }; | 314 | }; |
315 | 315 | ||
316 | typedef enum kprobe_insn (probes_custom_decode_t)(probes_opcode_t, | 316 | typedef enum probes_insn (probes_custom_decode_t)(probes_opcode_t, |
317 | struct arch_specific_insn *, | 317 | struct arch_specific_insn *, |
318 | const struct decode_header *); | 318 | const struct decode_header *); |
319 | 319 | ||
@@ -391,6 +391,11 @@ struct decode_or { | |||
391 | #define DECODE_OR(_mask, _value) \ | 391 | #define DECODE_OR(_mask, _value) \ |
392 | DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0) | 392 | DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0) |
393 | 393 | ||
394 | enum probes_insn { | ||
395 | INSN_REJECTED, | ||
396 | INSN_GOOD, | ||
397 | INSN_GOOD_NO_SLOT | ||
398 | }; | ||
394 | 399 | ||
395 | struct decode_reject { | 400 | struct decode_reject { |
396 | struct decode_header header; | 401 | struct decode_header header; |