diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-25 10:16:56 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-25 10:16:56 -0800 |
| commit | fd56e5104a37f96e1b1ca42b4fd64fd49257fdce (patch) | |
| tree | f1affd621b701bbfb83fde9a0046dac5baadef6e /tools/testing/selftests/rseq/param_test.c | |
| parent | 0f8e26b38d7ac72b3ad764944a25dd5808f37a6e (diff) | |
| parent | ea1413e5b53a8dd4fa7675edb23cdf828bbdce1e (diff) | |
Merge tag 'for-linus' of https://github.com/openrisc/linux
Pull OpenRISC updates from Stafford Horne:
- Added support for restartable sequences (me)
- Migration to Generic built-in DTB (Masahiro Yamada)
* tag 'for-linus' of https://github.com/openrisc/linux:
rseq/selftests: Add support for OpenRISC
openrisc: Add support for restartable sequences
openrisc: Add HAVE_REGS_AND_STACK_ACCESS_API support
openrisc: migrate to the generic rule for built-in DTB
Diffstat (limited to 'tools/testing/selftests/rseq/param_test.c')
| -rw-r--r-- | tools/testing/selftests/rseq/param_test.c | 24 |
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 2f37961240ca..05d03e679e06 100644 --- a/tools/testing/selftests/rseq/param_test.c +++ b/tools/testing/selftests/rseq/param_test.c @@ -226,8 +226,32 @@ unsigned int yield_mod_cnt, nr_abort; "addi " INJECT_ASM_REG "," INJECT_ASM_REG ", -1\n\t" \ "bnez " INJECT_ASM_REG ", 222b\n\t" \ "333:\n\t" +#elif defined(__or1k__) +#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 "r31" + +#define RSEQ_INJECT_CLOBBER \ + , INJECT_ASM_REG + +#define RSEQ_INJECT_ASM(n) \ + "l.lwz " INJECT_ASM_REG ", %[loop_cnt_" #n "]\n\t" \ + "l.sfeqi " INJECT_ASM_REG ", 0\n\t" \ + "l.bf 333f\n\t" \ + " l.nop\n\t" \ + "222:\n\t" \ + "l.addi " INJECT_ASM_REG "," INJECT_ASM_REG ", -1\n\t" \ + "l.sfeqi " INJECT_ASM_REG ", 0\n\t" \ + "l.bf 222f\n\t" \ + " l.nop\n\t" \ + "333:\n\t" #else #error unsupported target #endif |
