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:
d338c73
)
x86: add memory barriers to wrmsr
author
Jeremy Fitzhardinge
<
[email protected]
>
Wed, 25 Jun 2008 04:18:59 +0000
(
00:18
-0400)
committer
Ingo Molnar
<
[email protected]
>
Tue, 8 Jul 2008 11:10:24 +0000
(13:10 +0200)
wrmsr is a special instruction which can have arbitrary system-wide
effects. We don't want the compiler to reorder it with respect to
memory operations, so make it a memory barrier.
Signed-off-by: Jeremy Fitzhardinge <
[email protected]
>
Cc: xen-devel <
[email protected]
>
Cc: Stephen Tweedie <
[email protected]
>
Cc: Eduardo Habkost <
[email protected]
>
Cc: Mark McLoughlin <
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
include/asm-x86/msr.h
patch
|
blob
|
history
diff --git
a/include/asm-x86/msr.h
b/include/asm-x86/msr.h
index 2b5f2c91db25ce8b3879c6673fa2514cee80b8ce..ca110ee73f074cf41550e7d7860eb412b7bb82ed 100644
(file)
--- a/
include/asm-x86/msr.h
+++ b/
include/asm-x86/msr.h
@@
-66,7
+66,7
@@
static inline unsigned long long native_read_msr_safe(unsigned int msr,
static inline void native_write_msr(unsigned int msr,
unsigned low, unsigned high)
{
- asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high));
+ asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high)
: "memory"
);
}
static inline int native_write_msr_safe(unsigned int msr,
@@
-81,7
+81,8
@@
static inline int native_write_msr_safe(unsigned int msr,
_ASM_EXTABLE(2b, 3b)
: "=a" (err)
: "c" (msr), "0" (low), "d" (high),
- "i" (-EFAULT));
+ "i" (-EFAULT)
+ : "memory");
return err;
}