projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df25f86
)
powerpc/32: add helper to write into segment registers
author
Christophe Leroy
<christophe.leroy@c-s.fr>
Thu, 21 Feb 2019 19:08:44 +0000
(19:08 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Sat, 23 Feb 2019 10:04:32 +0000
(21:04 +1100)
This patch add an helper which wraps 'mtsrin' instruction
to write into segment registers.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/reg.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/include/asm/reg.h
b/arch/powerpc/include/asm/reg.h
index 1f79e1d8fb0bbb473a5c6db16e25c0814b364451..c25880e6a16afeacc07869884fc39e7a09443a89 100644
(file)
--- a/
arch/powerpc/include/asm/reg.h
+++ b/
arch/powerpc/include/asm/reg.h
@@
-1425,6
+1425,11
@@
static inline void msr_check_and_clear(unsigned long bits)
#define mfsrin(v) ({unsigned int rval; \
asm volatile("mfsrin %0,%1" : "=r" (rval) : "r" (v)); \
rval;})
+
+static inline void mtsrin(u32 val, u32 idx)
+{
+ asm volatile("mtsrin %0, %1" : : "r" (val), "r" (idx));
+}
#endif
#define proc_trap() asm volatile("trap")