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:27:33 -0700 |
commit | 93487ce8d6edc7c550b1449770df5e44715f520f (patch) | |
tree | 3de2fb856535fa71ab23f30ce8098e56ed9806d5 /arch/powerpc | |
parent | a8ed5765b5a8bf44a86284d80afd24f37a23e369 (diff) | |
download | kernel_samsung_aries-93487ce8d6edc7c550b1449770df5e44715f520f.zip kernel_samsung_aries-93487ce8d6edc7c550b1449770df5e44715f520f.tar.gz kernel_samsung_aries-93487ce8d6edc7c550b1449770df5e44715f520f.tar.bz2 |
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 c5cae0d..764e99c 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -1000,7 +1000,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") |