From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x2252xc2buJm16U2G7ogF8oyUuzDexAo6eFqWHKBXB1F9zsgsSiO/oQEKBmNQDxrYOBqASdA9 ARC-Seal: i=1; a=rsa-sha256; t=1516721578; cv=none; d=google.com; s=arc-20160816; b=NnWZDiYz1pEZF9jcf++1x/Kr+MNE1IGCPWC5obKZWkAhCOxBwpJfOFZDn0qgcHLnrX APkBhC2PNZD7ztu2og7OBZ7c7wT23TZDWvu1/MXpXrWLlxqi8eg6TaB3fpHGmIT++CcJ aVHidAlz1IZWXgTSzDbUOTQtNC0YAFpEGw/EJnjgYrPZW28BnYFBCsndSdC8fZjHjR4b A4FRuOM5lykT8JOFZRKNGnCoHmM0FD9B9cX6ZNfN6rFMdD+jnOfzJqueXijG5UBZo7Yy DytrBltyyEvGv8XgM9nE7gZglfOYt87BOmk/961K5JZrJS1Klw0qxvxiF0VRPiSVMm3X pSfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature:arc-authentication-results; bh=Hk+g23UGc+I/VEoPxpHDXjevkL9WUzIccR+5GsDY1p4=; b=leerwMOWNdgM2Q9BNGF/JHHcBh1Dl1FEPowkFq7H+iOIEOL4qJvD1GlLYrtJIECCfC kGkcsWkAcfJLdoM5BsDRtk5F7tPsSBE8j1XYoyviGfnkIKC9AsQpBTFgctN2249s8Cj2 uSwata7W0aToFPZHr4MUuLLNGM3BVUatuweDi6zw2AqhW3HZq2b4VMdabdXO35eRwTy6 yIvru6FtdDFs1rKHUAgbooQDW173991PRuyALKJGh4m9rjAN9Yj/iKyuUrdWXWZc5elK Tl9xKlBBi0/7wTYJ2YpVVeoEmadVMOIOPX8NyhVAPU1QuVWB5rZruVWiOd6iKQgWcWav fRBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=YpuUXuOw; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=peterz@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=YpuUXuOw; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=peterz@infradead.org Message-Id: <20180123152639.401695430@infradead.org> User-Agent: quilt/0.63-1 Date: Tue, 23 Jan 2018 16:26:03 +0100 From: Peter Zijlstra To: David Woodhouse , Thomas Gleixner , Josh Poimboeuf Cc: linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Jason Baron , Peter Zijlstra Subject: [PATCH 24/24] x86: Remove FAST_FEATURE_TESTS References: <20180123152539.374360046@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-x86-remove-fast-feature.patch X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590397845956157284?= X-GMAIL-MSGID: =?utf-8?q?1590397845956157284?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Since we want to rely on static branches to avoid speculation, remove any possible fallback code for static_cpu_has. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/Kconfig | 11 ----------- arch/x86/include/asm/cpufeature.h | 8 -------- 2 files changed, 19 deletions(-) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -389,17 +389,6 @@ config X86_FEATURE_NAMES If in doubt, say Y. -config X86_FAST_FEATURE_TESTS - bool "Fast CPU feature tests" if EMBEDDED - default y - ---help--- - Some fast-paths in the kernel depend on the capabilities of the CPU. - Say Y here for the kernel to patch in the appropriate code at runtime - based on the capabilities of the CPU. The infrastructure for patching - code at runtime takes up some additional space; space-constrained - embedded systems may wish to say N here to produce smaller, slightly - slower code. - config X86_X2APIC bool "Support x2apic" depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST) --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -137,7 +137,6 @@ extern void clear_cpu_cap(struct cpuinfo #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) -#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_X86_FAST_FEATURE_TESTS) /* * Static testing of CPU features. Used the same as boot_cpu_has(). * These will statically patch the target code for additional @@ -196,13 +195,6 @@ static __always_inline __pure bool _stat boot_cpu_has(bit) : \ _static_cpu_has(bit) \ ) -#else -/* - * Fall back to dynamic for gcc versions which don't support asm goto. Should be - * a minority now anyway. - */ -#define static_cpu_has(bit) boot_cpu_has(bit) -#endif #define cpu_has_bug(c, bit) cpu_has(c, (bit)) #define set_cpu_bug(c, bit) set_cpu_cap(c, (bit))