diff options
author | Tiejun Chen <tiejun.chen@windriver.com> | 2012-07-11 14:22:46 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-09 08:31:27 -0700 |
commit | a461394c31c5aa3c8cfe98dd0dc35f6b56047770 (patch) | |
tree | 8a1027c89bb12e5dca2e7bf9a23e880ce9abe68d /arch/powerpc | |
parent | 2cdb31f3c09f2bdd10d520a24def87d90c0030ba (diff) | |
download | linux-3.10-a461394c31c5aa3c8cfe98dd0dc35f6b56047770.tar.gz linux-3.10-a461394c31c5aa3c8cfe98dd0dc35f6b56047770.tar.bz2 linux-3.10-a461394c31c5aa3c8cfe98dd0dc35f6b56047770.zip |
powerpc: Add "memory" attribute for mfmsr()
commit b416c9a10baae6a177b4f9ee858b8d309542fbef upstream.
Add "memory" attribute in inline assembly language as a compiler
barrier to make sure 4.6.x GCC don't reorder mfmsr().
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 9d7f0fb6902..cae0ed7878e 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -1022,7 +1022,8 @@ /* Macros for setting and retrieving special purpose registers */ #ifndef __ASSEMBLY__ #define mfmsr() ({unsigned long rval; \ - asm volatile("mfmsr %0" : "=r" (rval)); rval;}) + asm volatile("mfmsr %0" : "=r" (rval) : \ + : "memory"); rval;}) #ifdef CONFIG_PPC_BOOK3S_64 #define __mtmsrd(v, l) asm volatile("mtmsrd %0," __stringify(l) \ : : "r" (v) : "memory") |