From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de, hpa@linux.intel.com, bp@suse.de
Subject: [tip:x86/fpu] x86, cpu: Add a synthetic, always true, cpu feature
Date: Thu, 20 Jun 2013 17:51:37 -0700 [thread overview]
Message-ID: <tip-c3b83598c1eeb1507603b461f5843ec2a49e3033@git.kernel.org> (raw)
In-Reply-To: <1370772454-6106-2-git-send-email-bp@alien8.de>
Commit-ID: c3b83598c1eeb1507603b461f5843ec2a49e3033
Gitweb: http://git.kernel.org/tip/c3b83598c1eeb1507603b461f5843ec2a49e3033
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Sun, 9 Jun 2013 12:07:30 +0200
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 20 Jun 2013 17:06:07 -0700
x86, cpu: Add a synthetic, always true, cpu feature
This will be used in alternatives later as an always-replace flag.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1370772454-6106-2-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/kernel/cpu/common.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index e99ac27..043d61e 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -92,7 +92,7 @@
#define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* "" Lfence synchronizes RDTSC */
#define X86_FEATURE_11AP (3*32+19) /* "" Bad local APIC aka 11AP */
#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
- /* 21 available, was AMD_C1E */
+#define X86_FEATURE_ALWAYS (3*32+21) /* "" Always-present feature */
#define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */
#define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */
#define X86_FEATURE_NONSTOP_TSC (3*32+24) /* TSC does not stop in C states */
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index d4dd993..d388ce1 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -723,6 +723,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
if (this_cpu->c_bsp_init)
this_cpu->c_bsp_init(c);
+
+ setup_force_cpu_cap(X86_FEATURE_ALWAYS);
}
void __init early_cpu_init(void)
next prev parent reply other threads:[~2013-06-21 0:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 10:07 [PATCH 0/5] Add a safe static_cpu_has variant Borislav Petkov
2013-06-09 10:07 ` [PATCH 1/5] x86, cpu: Add a synthetic cpu feature Borislav Petkov
2013-06-21 0:51 ` tip-bot for Borislav Petkov [this message]
2013-06-09 10:07 ` [PATCH 2/5] x86, debug: Add a collect-all misc debug checks option Borislav Petkov
2013-06-09 10:07 ` [PATCH 3/5] x86: Sanity-check static_cpu_has usage Borislav Petkov
2013-06-21 0:51 ` [tip:x86/fpu] " tip-bot for Borislav Petkov
2013-06-09 10:07 ` [PATCH 4/5] x86: Add a static_cpu_has_safe variant Borislav Petkov
2013-06-21 0:51 ` [tip:x86/fpu] " tip-bot for Borislav Petkov
2013-06-09 10:07 ` [PATCH 5/5] x86, FPU: Use static_cpu_has_safe before alternatives Borislav Petkov
2013-06-21 0:52 ` [tip:x86/fpu] x86, fpu: " tip-bot for Borislav Petkov
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=tip-c3b83598c1eeb1507603b461f5843ec2a49e3033@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®