mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
powerpc: Add "memory" attribute for mfmsr()
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> CC: stable@vger.kernel.org
This commit is contained in:
parent
fd5a42980e
commit
b416c9a10b
@ -1025,7 +1025,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")
|
||||
|
Loading…
Reference in New Issue
Block a user