mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/idle: undo use of MONITOR/MWAIT mnemonics
While the change is fine on staging, where the toolchain baseline was
moved, we need to remain compatible with older gas on stable branches
for now.
Fixes: fa254938f0 ("x86/idle: Move monitor()/mwait() wrappers into cpu-idle.c")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
14bcad6593
commit
5da8dd30b7
1 file changed
+3
-3
@@ -69,20 +69,20 @@ static always_inline void monitor(
|
||||
* The memory clobber is a compiler barrier. Subseqeunt reads from the
|
||||
* monitored cacheline must not be reordered over MONITOR.
|
||||
*/
|
||||
asm volatile ( "monitor"
|
||||
asm volatile ( ".byte 0x0f, 0x01, 0xc8" /* monitor */
|
||||
:: "a" (addr), "c" (ecx), "d" (edx) : "memory" );
|
||||
}
|
||||
|
||||
static always_inline void mwait(unsigned int eax, unsigned int ecx)
|
||||
{
|
||||
asm volatile ( "mwait"
|
||||
asm volatile ( ".byte 0x0f, 0x01, 0xc9" /* mwait */
|
||||
:: "a" (eax), "c" (ecx) );
|
||||
}
|
||||
|
||||
static always_inline void sti_mwait_cli(unsigned int eax, unsigned int ecx)
|
||||
{
|
||||
/* STI shadow covers MWAIT. */
|
||||
asm volatile ( "sti; mwait; cli"
|
||||
asm volatile ( "sti; .byte 0x0f, 0x01, 0xc9;" /* mwait */ " cli"
|
||||
:: "a" (eax), "c" (ecx) );
|
||||
}
|
||||
|
||||
|
||||