projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b549f8
)
xtensa: add xtensa_xsr macro
author
Max Filippov
<jcmvbkbc@gmail.com>
Mon, 25 Nov 2019 20:59:13 +0000
(12:59 -0800)
committer
Max Filippov
<jcmvbkbc@gmail.com>
Mon, 2 May 2022 02:51:23 +0000
(19:51 -0700)
xtensa_xsr does the XSR instruction for the specified special register.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/processor.h
patch
|
blob
|
history
diff --git
a/arch/xtensa/include/asm/processor.h
b/arch/xtensa/include/asm/processor.h
index 4489a27d527a801314e791fcd041c07b6f1fe1ac..76bc63127c66ef02403d4b7d5c67bd28a0d10456 100644
(file)
--- a/
arch/xtensa/include/asm/processor.h
+++ b/
arch/xtensa/include/asm/processor.h
@@
-246,6
+246,13
@@
extern unsigned long __get_wchan(struct task_struct *p);
v; \
})
+#define xtensa_xsr(x, sr) \
+ ({ \
+ unsigned int __v__ = (unsigned int)(x); \
+ __asm__ __volatile__ ("xsr %0, " __stringify(sr) : "+a"(__v__)); \
+ __v__; \
+ })
+
#if XCHAL_HAVE_EXTERN_REGS
static inline void set_er(unsigned long value, unsigned long addr)