aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rseq/param_test.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2018-07-02 11:14:50 -0600
committerJonathan Corbet <corbet@lwn.net>2018-07-02 11:14:50 -0600
commit5f6654094ff35a7a92eb76667788ef633595e4ea (patch)
tree8404c5fb245cddbc6877b97a9bf53139c95da852 /tools/testing/selftests/rseq/param_test.c
parent5105730fbf6789ff9e20837bdefe32e8ba133595 (diff)
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063 (diff)
downloadkernel_replicant_linux-5f6654094ff35a7a92eb76667788ef633595e4ea.tar.gz
kernel_replicant_linux-5f6654094ff35a7a92eb76667788ef633595e4ea.tar.bz2
kernel_replicant_linux-5f6654094ff35a7a92eb76667788ef633595e4ea.zip
Merge tag 'v4.18-rc3' into docs-next
-rc1 broke the docs build due to changes in the e100/e1000 drivers; -rc3 got the fixes via the networking tree. Pull in -rc3 so that the docs tree can actually build the docs again.
Diffstat (limited to 'tools/testing/selftests/rseq/param_test.c')
-rw-r--r--tools/testing/selftests/rseq/param_test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/rseq/param_test.c b/tools/testing/selftests/rseq/param_test.c
index 6a9f602a8718..615252331813 100644
--- a/tools/testing/selftests/rseq/param_test.c
+++ b/tools/testing/selftests/rseq/param_test.c
@@ -137,6 +137,30 @@ unsigned int yield_mod_cnt, nr_abort;
"subic. %%" INJECT_ASM_REG ", %%" INJECT_ASM_REG ", 1\n\t" \
"bne 222b\n\t" \
"333:\n\t"
+
+#elif defined(__mips__)
+
+#define RSEQ_INJECT_INPUT \
+ , [loop_cnt_1]"m"(loop_cnt[1]) \
+ , [loop_cnt_2]"m"(loop_cnt[2]) \
+ , [loop_cnt_3]"m"(loop_cnt[3]) \
+ , [loop_cnt_4]"m"(loop_cnt[4]) \
+ , [loop_cnt_5]"m"(loop_cnt[5]) \
+ , [loop_cnt_6]"m"(loop_cnt[6])
+
+#define INJECT_ASM_REG "$5"
+
+#define RSEQ_INJECT_CLOBBER \
+ , INJECT_ASM_REG
+
+#define RSEQ_INJECT_ASM(n) \
+ "lw " INJECT_ASM_REG ", %[loop_cnt_" #n "]\n\t" \
+ "beqz " INJECT_ASM_REG ", 333f\n\t" \
+ "222:\n\t" \
+ "addiu " INJECT_ASM_REG ", -1\n\t" \
+ "bnez " INJECT_ASM_REG ", 222b\n\t" \
+ "333:\n\t"
+
#else
#error unsupported target
#endif