Re: [PATCH -tip 2/4] x86/idle: Use MONITOR and MWAIT mnemonics in <asm/mwait.h>
From: Andy Shevchenko
Date: Thu Apr 03 2025 - 11:33:39 EST
On Wed, Apr 02, 2025 at 08:08:06PM +0200, Uros Bizjak wrote:
> Current minimum required version of binutils is 2.25,
> which supports MONITOR and MWAIT instruction mnemonics.
>
> Replace the byte-wise specification of MONITOR and
> MWAIT with these proper mnemonics.
>
> No functional change intended.
Hmm... Is it only me who gets these, please?
In file included from acpi/cstate.c:18:
asm/mwait.h:30:15: error: invalid operand for instruction
30 | asm volatile("monitor %0, %1, %2" :: "a" (eax), "c" (ecx), "d" (edx));
| ^
<inline asm>:1:16: note: instantiated into assembly here
1 | monitor %rax, %ecx, %edx
| ^~~~~
In file included from acpi/cstate.c:18:
asm/mwait.h:95:15: error: instruction requires: Not 64-bit mode
95 | asm volatile("sti; mwait %0, %1" :: "a" (eax), "c" (ecx));
| ^
<inline asm>:1:7: note: instantiated into assembly here
1 | sti; mwait %eax, %ecx
| ^
--
With Best Regards,
Andy Shevchenko