提交 33f8c40a 编写于 作者: V Vegard Nossum 提交者: 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: NVegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3e6de5a3
......@@ -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)
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册