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/rseq-or1k-thread-pointer.h | |
| 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/rseq-or1k-thread-pointer.h')
| -rw-r--r-- | tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h b/tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h new file mode 100644 index 000000000000..cda740f7aff3 --- /dev/null +++ b/tools/testing/selftests/rseq/rseq-or1k-thread-pointer.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ +#ifndef _RSEQ_OR1K_THREAD_POINTER +#define _RSEQ_OR1K_THREAD_POINTER + +static inline void *rseq_thread_pointer(void) +{ + void *__thread_register; + + __asm__ ("l.or %0, r10, r0" : "=r" (__thread_register)); + return __thread_register; +} + +#endif |
