LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: mingo@kernel.org, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: [PATCH 2/2] x86: Remove FAST_FEATURE_TESTS
Date: Mon, 19 Mar 2018 16:41:26 +0100 [thread overview]
Message-ID: <20180319154717.705383007@infradead.org> (raw)
In-Reply-To: <20180319154124.337947038@infradead.org>
[-- Attachment #1: peterz-x86-remove-fast-feature.patch --]
[-- Type: text/plain, Size: 1861 bytes --]
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) <peterz@infradead.org>
---
arch/x86/Kconfig | 11 -----------
arch/x86/include/asm/cpufeature.h | 8 --------
2 files changed, 19 deletions(-)
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -393,17 +393,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
@@ -140,7 +140,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))
next prev parent reply other threads:[~2018-03-19 22:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 15:41 [PATCH 0/2] x86: Mandate asm-goto support Peter Zijlstra
2018-03-19 15:41 ` [PATCH 1/2] x86: Force asm-goto Peter Zijlstra
2018-03-19 19:57 ` Thomas Gleixner
2018-03-19 20:13 ` Peter Zijlstra
2018-03-20 10:00 ` [tip:x86/build] " tip-bot for Peter Zijlstra
2018-03-27 16:43 ` [PATCH 1/2] " Anders Roxell
2018-03-20 15:45 ` Jonathan Corbet
2018-03-20 15:50 ` Peter Zijlstra
2018-03-20 18:44 ` Jonathan Corbet
2018-03-22 12:10 ` Pavel Machek
2018-03-19 15:41 ` Peter Zijlstra [this message]
2018-03-20 10:01 ` [tip:x86/build] x86: Remove FAST_FEATURE_TESTS tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180319154717.705383007@infradead.org \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--subject='Re: [PATCH 2/2] x86: Remove FAST_FEATURE_TESTS' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).