diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2016-02-09 17:08:14 +0100 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-03-11 17:18:02 -0600 |
commit | 1458dd951f7cc0127508f928497c9ab06b5e557d (patch) | |
tree | a8f432dc38bfde94a6070f05c3be88ce64af7c0f /arch/powerpc/include/asm/reg.h | |
parent | 7ee5cf6bfad7990cc33d10888d869c1eb7d4a927 (diff) | |
download | linux-1458dd951f7cc0127508f928497c9ab06b5e557d.tar.bz2 |
powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro
MPC8xx has an ERRATA on the use of mtspr() for some registers
This patch includes the ERRATA handling directly into mtspr() macro
so that mtspr() users don't need to bother about that errata
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'arch/powerpc/include/asm/reg.h')
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 52ed654d01ba..f5f4c66bbbc9 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -1219,9 +1219,11 @@ static inline void mtmsr_isync(unsigned long val) #define mfspr(rn) ({unsigned long rval; \ asm volatile("mfspr %0," __stringify(rn) \ : "=r" (rval)); rval;}) +#ifndef mtspr #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : \ : "r" ((unsigned long)(v)) \ : "memory") +#endif extern void msr_check_and_set(unsigned long bits); extern bool strict_msr_control; |