Commit 2f0a7504 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86_cleanups_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Borislav Petkov:

 - Simplify inline asm flag output operands now that the minimum
   compiler version supports the =@ccCOND syntax

 - Remove a bunch of AS_* Kconfig symbols which detect assembler support
   for various instruction mnemonics now that the minimum assembler
   version supports them all

 - The usual cleanups all over the place

* tag 'x86_cleanups_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm: Remove code depending on __GCC_ASM_FLAG_OUTPUTS__
  x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h>
  x86/mtrr: Remove license boilerplate text with bad FSF address
  x86/asm: Use RDPKRU and WRPKRU mnemonics in <asm/special_insns.h>
  x86/idle: Use MONITORX and MWAITX mnemonics in <asm/mwait.h>
  x86/entry/fred: Push __KERNEL_CS directly
  x86/kconfig: Remove CONFIG_AS_AVX512
  crypto: x86 - Remove CONFIG_AS_VPCLMULQDQ
  crypto: X86 - Remove CONFIG_AS_VAES
  crypto: x86 - Remove CONFIG_AS_GFNI
  x86/kconfig: Drop unused and needless config X86_64_SMP
parents 6bb71f0f c6c973db
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -412,10 +412,6 @@ config HAVE_INTEL_TXT
	def_bool y
	depends on INTEL_IOMMU && ACPI

config X86_64_SMP
	def_bool y
	depends on X86_64 && SMP

config ARCH_SUPPORTS_UPROBES
	def_bool y

+0 −20
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.

config AS_AVX512
	def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5)
	help
	  Supported by binutils >= 2.25 and LLVM integrated assembler

config AS_GFNI
	def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2)
	help
	  Supported by binutils >= 2.30 and LLVM integrated assembler

config AS_VAES
	def_bool $(as-instr,vaesenc %ymm0$(comma)%ymm1$(comma)%ymm2)
	help
	  Supported by binutils >= 2.30 and LLVM integrated assembler

config AS_VPCLMULQDQ
	def_bool $(as-instr,vpclmulqdq \$0x10$(comma)%ymm0$(comma)%ymm1$(comma)%ymm2)
	help
	  Supported by binutils >= 2.30 and LLVM integrated assembler

config AS_WRUSS
	def_bool $(as-instr64,wrussq %rax$(comma)(%rbx))
	help
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ static inline bool variable_test_bit(int nr, const void *addr)
	bool v;
	const u32 *p = addr;

	asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr));
	asm("btl %2,%1" : "=@ccc" (v) : "m" (*p), "Ir" (nr));
	return v;
}

+4 −4
Original line number Diff line number Diff line
@@ -155,15 +155,15 @@ static inline void wrgs32(u32 v, addr_t addr)
static inline bool memcmp_fs(const void *s1, addr_t s2, size_t len)
{
	bool diff;
	asm volatile("fs repe cmpsb" CC_SET(nz)
		     : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
	asm volatile("fs repe cmpsb"
		     : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
	return diff;
}
static inline bool memcmp_gs(const void *s1, addr_t s2, size_t len)
{
	bool diff;
	asm volatile("gs repe cmpsb" CC_SET(nz)
		     : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
	asm volatile("gs repe cmpsb"
		     : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
	return diff;
}

+2 −2
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@
int memcmp(const void *s1, const void *s2, size_t len)
{
	bool diff;
	asm("repe cmpsb" CC_SET(nz)
	    : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
	asm("repe cmpsb"
	    : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len));
	return diff;
}

Loading