aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2014-03-05 21:23:42 -0500
committerDavid A. Long <dave.long@linaro.org>2014-03-18 16:39:38 -0400
commit44a0a59c535004eac9f18210cb2ce10b23861630 (patch)
tree7671e87de628e95118d9bb9391fd24334639d007 /arch/arm/kernel
parenteb73ea97e63bb06bf98ff052615ce181bc7f69ec (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.c2
-rw-r--r--arch/arm/kernel/kprobes-thumb.c16
-rw-r--r--arch/arm/kernel/kprobes.h14
-rw-r--r--arch/arm/kernel/probes-arm.c2
-rw-r--r--arch/arm/kernel/probes-thumb.c4
-rw-r--r--arch/arm/kernel/probes.h9
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
126enum kprobe_insn __kprobes 126enum probes_insn __kprobes
127kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, 127kprobe_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
69static enum kprobe_insn __kprobes 69static enum probes_insn __kprobes
70t32_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, 70t32_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
145static enum kprobe_insn __kprobes 145static enum probes_insn __kprobes
146t32_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, 146t32_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
405static enum kprobe_insn __kprobes 405static enum probes_insn __kprobes
406t16_decode_it(probes_opcode_t insn, struct arch_specific_insn *asi, 406t16_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
423static enum kprobe_insn __kprobes 423static enum probes_insn __kprobes
424t16_decode_cond_branch(probes_opcode_t insn, struct arch_specific_insn *asi, 424t16_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
513static enum kprobe_insn __kprobes 513static enum probes_insn __kprobes
514t16_decode_hiregs(probes_opcode_t insn, struct arch_specific_insn *asi, 514t16_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
541static enum kprobe_insn __kprobes 541static enum probes_insn __kprobes
542t16_decode_push(probes_opcode_t insn, struct arch_specific_insn *asi, 542t16_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
594static enum kprobe_insn __kprobes 594static enum probes_insn __kprobes
595t16_decode_pop(probes_opcode_t insn, struct arch_specific_insn *asi, 595t16_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 @@
30struct decode_header; 30struct decode_header;
31union decode_action; 31union decode_action;
32 32
33enum kprobe_insn { 33typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
34 INSN_REJECTED,
35 INSN_GOOD,
36 INSN_GOOD_NO_SLOT
37};
38
39typedef 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
45enum kprobe_insn thumb16_kprobe_decode_insn(probes_opcode_t, 39enum 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 *);
48enum kprobe_insn thumb32_kprobe_decode_insn(probes_opcode_t, 42enum 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
54enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t, 48enum 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 */
726enum kprobe_insn __kprobes 726enum probes_insn __kprobes
727arm_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, 727arm_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
864enum kprobe_insn __kprobes 864enum probes_insn __kprobes
865thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, 865thumb16_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
874enum kprobe_insn __kprobes 874enum probes_insn __kprobes
875thumb32_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi, 875thumb32_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 *,
138void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *, 138void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *,
139 struct pt_regs *regs); 139 struct pt_regs *regs);
140 140
141enum kprobe_insn __kprobes 141enum probes_insn __kprobes
142kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi, 142kprobe_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
316typedef enum kprobe_insn (probes_custom_decode_t)(probes_opcode_t, 316typedef 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
394enum probes_insn {
395 INSN_REJECTED,
396 INSN_GOOD,
397 INSN_GOOD_NO_SLOT
398};
394 399
395struct decode_reject { 400struct decode_reject {
396 struct decode_header header; 401 struct decode_header header;