From: tip-bot for Jiaxun Yang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: suravee.suthikulpanit@amd.com, jiaxun.yang@flygoat.com,
tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org,
sherry.hurwitz@amd.com, mingo@redhat.com, bp@suse.de,
mingo@kernel.org, thomas.lendacky@amd.com, hpa@zytor.com
Subject: [tip:x86/cpu] x86/CPU/AMD: Set the CPB bit unconditionally on F17h
Date: Fri, 18 Jan 2019 07:48:59 -0800 [thread overview]
Message-ID: <tip-0237199186e7a4aa5310741f0a6498a20c820fd7@git.kernel.org> (raw)
In-Reply-To: <20181120030018.5185-1-jiaxun.yang@flygoat.com>
Commit-ID: 0237199186e7a4aa5310741f0a6498a20c820fd7
Gitweb: https://git.kernel.org/tip/0237199186e7a4aa5310741f0a6498a20c820fd7
Author: Jiaxun Yang <jiaxun.yang@flygoat.com>
AuthorDate: Tue, 20 Nov 2018 11:00:18 +0800
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Fri, 18 Jan 2019 16:44:03 +0100
x86/CPU/AMD: Set the CPB bit unconditionally on F17h
Some F17h models do not have CPB set in CPUID even though the CPU
supports it. Set the feature bit unconditionally on all F17h.
[ bp: Rewrite commit message and patch. ]
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20181120030018.5185-1-jiaxun.yang@flygoat.com
---
arch/x86/kernel/cpu/amd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 69f6bbb41be0..01004bfb1a1b 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -819,11 +819,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
static void init_amd_zn(struct cpuinfo_x86 *c)
{
set_cpu_cap(c, X86_FEATURE_ZEN);
- /*
- * Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
- * all up to and including B1.
- */
- if (c->x86_model <= 1 && c->x86_stepping <= 1)
+
+ /* Fix erratum 1076: CPB feature bit not being set in CPUID. */
+ if (!cpu_has(c, X86_FEATURE_CPB))
set_cpu_cap(c, X86_FEATURE_CPB);
}
next prev parent reply other threads:[~2019-01-18 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 3:00 [PATCH v2] x86/cpu/AMD: Fix CPB bit for more processors Jiaxun Yang
2019-01-18 15:48 ` tip-bot for Jiaxun Yang [this message]
2019-02-20 8:53 ` [tip:x86/cpu] x86/CPU/AMD: Set the CPB bit unconditionally on F17h Borislav Petkov
2019-02-21 11:52 ` Greg KH
2019-02-21 12:25 ` Borislav Petkov
2019-03-08 10:26 ` Greg KH
2019-03-11 16:32 ` Erwan Velu
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-0237199186e7a4aa5310741f0a6498a20c820fd7@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=sherry.hurwitz@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/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