mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
x86/idle: Remove CONFIG_AS_TPAUSE
There is not much point in CONFIG_AS_TPAUSE at all when the emitted assembly is always the same - it only obfuscates the __tpause() code in essence. Remove the TPAUSE insn mnemonic from __tpause() and leave only the equivalent byte-wise definition. This can then be changed back to insn mnemonic once binutils 2.31.1 is the minimum version to build the kernel. (Right now it's 2.25.) Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Juergen Gross <jgross@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: Rik van Riel <riel@surriel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250402180827.3762-4-ubizjak@gmail.com
This commit is contained in:
parent
19c3dcd953
commit
a72d55dc3b
|
|
@ -15,10 +15,6 @@ config AS_SHA256_NI
|
|||
def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1)
|
||||
help
|
||||
Supported by binutils >= 2.24 and LLVM integrated assembler
|
||||
config AS_TPAUSE
|
||||
def_bool $(as-instr,tpause %ecx)
|
||||
help
|
||||
Supported by binutils >= 2.31.1 and LLVM integrated assembler >= V7
|
||||
|
||||
config AS_GFNI
|
||||
def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2)
|
||||
|
|
|
|||
|
|
@ -138,16 +138,9 @@ static __always_inline void mwait_idle_with_hints(unsigned long eax, unsigned lo
|
|||
*/
|
||||
static inline void __tpause(u32 ecx, u32 edx, u32 eax)
|
||||
{
|
||||
/* "tpause %ecx, %edx, %eax" */
|
||||
#ifdef CONFIG_AS_TPAUSE
|
||||
asm volatile("tpause %%ecx"
|
||||
:
|
||||
: "c"(ecx), "d"(edx), "a"(eax));
|
||||
#else
|
||||
/* "tpause %ecx" */
|
||||
asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1"
|
||||
:
|
||||
: "c"(ecx), "d"(edx), "a"(eax));
|
||||
#endif
|
||||
:: "c" (ecx), "d" (edx), "a" (eax));
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_MWAIT_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user