aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-06-25 00:18:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 13:10:23 +0200
commitd338c73c39a6ed0d07fe3bb07c7f12fff0dd237d (patch)
tree0b285466af10f7e6e3d2c2fea87309b7a0e9b984
parentbea41808efdd8815435376209f23f406f8bf435f (diff)
x86: add memory clobber to save/loadsegment
Add "memory" clobbers to savesegment and loadsegment, since they can affect memory accesses and we never want the compiler to reorder them with respect to memory references. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: xen-devel <xen-devel@lists.xensource.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/asm-x86/system.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index bacfceedf1d..f686aa6abfe 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -153,14 +153,14 @@ extern void load_gs_index(unsigned);
"jmp 2b\n" \
".previous\n" \
_ASM_EXTABLE(1b,3b) \
- : :"r" (value), "r" (0))
+ : :"r" (value), "r" (0) : "memory")
/*
* Save a segment register away
*/
#define savesegment(seg, value) \
- asm volatile("mov %%" #seg ",%0":"=rm" (value))
+ asm("mov %%" #seg ",%0":"=rm" (value) : : "memory")
static inline unsigned long get_limit(unsigned long segment)
{