x86/idle: Use MONITOR and MWAIT mnemonics in <asm/mwait.h>
authorUros Bizjak <ubizjak@gmail.com>
Thu, 3 Apr 2025 12:50:45 +0000 (14:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 3 Apr 2025 14:28:38 +0000 (16:28 +0200)
commitfc1cd60042b3df1d162278461c7a87f0362502b8
tree58aae61aab0315a6cfa84515cee6e010a13bb3d5
parenta17b37a3f416c9e385bbd2b5fc603d337eab76eb
x86/idle: Use MONITOR and MWAIT mnemonics in <asm/mwait.h>

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.

Note: LLVM assembler is not able to assemble correct forms of MONITOR
and MWAIT instructions with explicit operands and reports:

  error: invalid operand for instruction
          monitor %rax,%ecx,%edx
                       ^~~~
  # https://lore.kernel.org/oe-kbuild-all/202504030802.2lEVBSpN-lkp@intel.com/

Use instruction mnemonics with implicit operands to
work around this issue.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20250403125111.429805-1-ubizjak@gmail.com
arch/x86/include/asm/mwait.h