aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2015-01-07 06:42:30 -0500
committerJon Medhurst <tixy@linaro.org>2015-01-09 04:36:51 -0500
commit832607e79d7423c67ef8a3de8dfa3d25b5b0bf86 (patch)
treec16876fab4d3f0a6d53712784605c5e2fdab0379 /arch
parentfca08f326ae0423f03b097ff54de432fe77b95d0 (diff)
ARM: probes: Use correct action types for MOVW, SEV and WFI
This doesn't correct any bugs when probing these instructions but makes MOVW slightly faster and makes everything more symmetric with the Thumb instruction cases. We can also remove the now redundant PROBES_EMULATE_NONE and PROBES_SIMULATE_NOP actions. Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/probes/decode-arm.c6
-rw-r--r--arch/arm/probes/decode-arm.h2
-rw-r--r--arch/arm/probes/kprobes/actions-arm.c2
-rw-r--r--arch/arm/probes/uprobes/actions-arm.c2
4 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/probes/decode-arm.c b/arch/arm/probes/decode-arm.c
index e39cc75952f2..04114f74a2d2 100644
--- a/arch/arm/probes/decode-arm.c
+++ b/arch/arm/probes/decode-arm.c
@@ -370,17 +370,17 @@ static const union decode_item arm_cccc_001x_table[] = {
370 370
371 /* MOVW cccc 0011 0000 xxxx xxxx xxxx xxxx xxxx */ 371 /* MOVW cccc 0011 0000 xxxx xxxx xxxx xxxx xxxx */
372 /* MOVT cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx */ 372 /* MOVT cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx */
373 DECODE_EMULATEX (0x0fb00000, 0x03000000, PROBES_DATA_PROCESSING_IMM, 373 DECODE_EMULATEX (0x0fb00000, 0x03000000, PROBES_MOV_HALFWORD,
374 REGS(0, NOPC, 0, 0, 0)), 374 REGS(0, NOPC, 0, 0, 0)),
375 375
376 /* YIELD cccc 0011 0010 0000 xxxx xxxx 0000 0001 */ 376 /* YIELD cccc 0011 0010 0000 xxxx xxxx 0000 0001 */
377 DECODE_OR (0x0fff00ff, 0x03200001), 377 DECODE_OR (0x0fff00ff, 0x03200001),
378 /* SEV cccc 0011 0010 0000 xxxx xxxx 0000 0100 */ 378 /* SEV cccc 0011 0010 0000 xxxx xxxx 0000 0100 */
379 DECODE_EMULATE (0x0fff00ff, 0x03200004, PROBES_EMULATE_NONE), 379 DECODE_EMULATE (0x0fff00ff, 0x03200004, PROBES_SEV),
380 /* NOP cccc 0011 0010 0000 xxxx xxxx 0000 0000 */ 380 /* NOP cccc 0011 0010 0000 xxxx xxxx 0000 0000 */
381 /* WFE cccc 0011 0010 0000 xxxx xxxx 0000 0010 */ 381 /* WFE cccc 0011 0010 0000 xxxx xxxx 0000 0010 */
382 /* WFI cccc 0011 0010 0000 xxxx xxxx 0000 0011 */ 382 /* WFI cccc 0011 0010 0000 xxxx xxxx 0000 0011 */
383 DECODE_SIMULATE (0x0fff00fc, 0x03200000, PROBES_SIMULATE_NOP), 383 DECODE_SIMULATE (0x0fff00fc, 0x03200000, PROBES_WFE),
384 /* DBG cccc 0011 0010 0000 xxxx xxxx ffff xxxx */ 384 /* DBG cccc 0011 0010 0000 xxxx xxxx ffff xxxx */
385 /* unallocated hints cccc 0011 0010 0000 xxxx xxxx xxxx xxxx */ 385 /* unallocated hints cccc 0011 0010 0000 xxxx xxxx xxxx xxxx */
386 /* MSR (immediate) cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx */ 386 /* MSR (immediate) cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx */
diff --git a/arch/arm/probes/decode-arm.h b/arch/arm/probes/decode-arm.h
index 9c56b40d6a57..cb0b26331930 100644
--- a/arch/arm/probes/decode-arm.h
+++ b/arch/arm/probes/decode-arm.h
@@ -18,8 +18,6 @@
18#include "decode.h" 18#include "decode.h"
19 19
20enum probes_arm_action { 20enum probes_arm_action {
21 PROBES_EMULATE_NONE,
22 PROBES_SIMULATE_NOP,
23 PROBES_PRELOAD_IMM, 21 PROBES_PRELOAD_IMM,
24 PROBES_PRELOAD_REG, 22 PROBES_PRELOAD_REG,
25 PROBES_BRANCH_IMM, 23 PROBES_BRANCH_IMM,
diff --git a/arch/arm/probes/kprobes/actions-arm.c b/arch/arm/probes/kprobes/actions-arm.c
index 8797879f7b3a..2206f2d80c76 100644
--- a/arch/arm/probes/kprobes/actions-arm.c
+++ b/arch/arm/probes/kprobes/actions-arm.c
@@ -302,8 +302,6 @@ emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(probes_opcode_t insn,
302} 302}
303 303
304const union decode_action kprobes_arm_actions[NUM_PROBES_ARM_ACTIONS] = { 304const union decode_action kprobes_arm_actions[NUM_PROBES_ARM_ACTIONS] = {
305 [PROBES_EMULATE_NONE] = {.handler = probes_emulate_none},
306 [PROBES_SIMULATE_NOP] = {.handler = probes_simulate_nop},
307 [PROBES_PRELOAD_IMM] = {.handler = probes_simulate_nop}, 305 [PROBES_PRELOAD_IMM] = {.handler = probes_simulate_nop},
308 [PROBES_PRELOAD_REG] = {.handler = probes_simulate_nop}, 306 [PROBES_PRELOAD_REG] = {.handler = probes_simulate_nop},
309 [PROBES_BRANCH_IMM] = {.handler = simulate_blx1}, 307 [PROBES_BRANCH_IMM] = {.handler = simulate_blx1},
diff --git a/arch/arm/probes/uprobes/actions-arm.c b/arch/arm/probes/uprobes/actions-arm.c
index 1dd4916ba8aa..76eb44972ebe 100644
--- a/arch/arm/probes/uprobes/actions-arm.c
+++ b/arch/arm/probes/uprobes/actions-arm.c
@@ -195,8 +195,6 @@ uprobe_decode_ldmstm(probes_opcode_t insn,
195} 195}
196 196
197const union decode_action uprobes_probes_actions[] = { 197const union decode_action uprobes_probes_actions[] = {
198 [PROBES_EMULATE_NONE] = {.handler = probes_simulate_nop},
199 [PROBES_SIMULATE_NOP] = {.handler = probes_simulate_nop},
200 [PROBES_PRELOAD_IMM] = {.handler = probes_simulate_nop}, 198 [PROBES_PRELOAD_IMM] = {.handler = probes_simulate_nop},
201 [PROBES_PRELOAD_REG] = {.handler = probes_simulate_nop}, 199 [PROBES_PRELOAD_REG] = {.handler = probes_simulate_nop},
202 [PROBES_BRANCH_IMM] = {.handler = simulate_blx1}, 200 [PROBES_BRANCH_IMM] = {.handler = simulate_blx1},