From 33f8c40a30ae99e971d068c9ec6088e713c46f5f Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sun, 14 Sep 2008 19:03:53 +0200 Subject: x86: add memory clobber in switch_to() Segment registers are reloaded, so we should add a memory clobber. The generated assembly code is identical in my tests, but this doesn't mean it is necessarily true for all configurations/compilers. x86_64 already has the memory clobber. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar --- include/asm-x86/system.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 34505dd7b24..b20c894660f 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h @@ -64,7 +64,10 @@ do { \ \ /* regparm parameters for __switch_to(): */ \ [prev] "a" (prev), \ - [next] "d" (next)); \ + [next] "d" (next) \ + \ + : /* reloaded segment registers */ \ + "memory"); \ } while (0) /* -- cgit v1.2.3-70-g09d2