summaryrefslogtreecommitdiffstats
path: root/arch/arm/probes/kprobes/test-arm.c
diff options
context:
space:
mode:
authorJon Medhurst (Tixy) <tixy@linaro.org>2015-01-05 19:29:40 +0800
committerJon Medhurst <tixy@linaro.org>2015-01-13 16:10:17 +0000
commit4cd872d973c7e1ce6a41e36db9d9352152da32d4 (patch)
tree9418dd882418266bcbd60e0d7d757615b02ac6d0 /arch/arm/probes/kprobes/test-arm.c
parent0dc016dbd820260b8ea74337980735b8c88d4ef2 (diff)
downloadlinux-4cd872d973c7e1ce6a41e36db9d9352152da32d4.tar.bz2
ARM: kprobes: Fix unreliable MRS instruction tests
For the instruction 'mrs Rn, cpsr' the resulting value of Rn can vary due to external factors we can't control. So get the test code to mask out these indeterminate bits. Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/probes/kprobes/test-arm.c')
-rw-r--r--arch/arm/probes/kprobes/test-arm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/probes/kprobes/test-arm.c b/arch/arm/probes/kprobes/test-arm.c
index 9b3b1b4a0939..e72b07e8cd9a 100644
--- a/arch/arm/probes/kprobes/test-arm.c
+++ b/arch/arm/probes/kprobes/test-arm.c
@@ -204,9 +204,9 @@ void kprobe_arm_test_cases(void)
#endif
TEST_GROUP("Miscellaneous instructions")
- TEST("mrs r0, cpsr")
- TEST("mrspl r7, cpsr")
- TEST("mrs r14, cpsr")
+ TEST_RMASKED("mrs r",0,~PSR_IGNORE_BITS,", cpsr")
+ TEST_RMASKED("mrspl r",7,~PSR_IGNORE_BITS,", cpsr")
+ TEST_RMASKED("mrs r",14,~PSR_IGNORE_BITS,", cpsr")
TEST_UNSUPPORTED(__inst_arm(0xe10ff000) " @ mrs r15, cpsr")
TEST_UNSUPPORTED("mrs r0, spsr")
TEST_UNSUPPORTED("mrs lr, spsr")