Re: [PATCH -tip v2] x86/idle: Work around LLVM assembler bug with MONITOR and MWAIT insn
From: Ingo Molnar
Date: Thu Apr 03 2025 - 07:20:46 EST
* Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
> LLVM assembler is not able to assemble correct forms of MONITOR
> and MWAIT instructions with explicit operands:
>
> error: invalid operand for instruction
> monitor %rax,%ecx,%edx
> ^~~~
>
> Use instruction mnemonics with implicit operands to
> work around this issue.
>
> Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> Fixes: cd3b85b27542 ("x86/idle: Use MONITOR and MWAIT mnemonics in <asm/mwait.h>")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
So I've zapped cd3b85b27542 instead - let's re-try it again and
see if there's any code generation tradeoffs vs. the byte encodings?
Thanks,
Ingo