Commit 33f8c40a authored by Vegard Nossum's avatar Vegard Nossum Committed by Ingo Molnar

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: default avatarVegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3e6de5a3
...@@ -64,7 +64,10 @@ do { \ ...@@ -64,7 +64,10 @@ do { \
\ \
/* regparm parameters for __switch_to(): */ \ /* regparm parameters for __switch_to(): */ \
[prev] "a" (prev), \ [prev] "a" (prev), \
[next] "d" (next)); \ [next] "d" (next) \
\
: /* reloaded segment registers */ \
"memory"); \
} while (0) } while (0)
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment