From: Perry Yuan <Perry.Yuan@amd.com>
To: <Ray.Huang@amd.com>, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Perry Yuan <Perry.Yuan@amd.com>,
Kim Phillips <kim.phillips@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Tony Luck <tony.luck@intel.com>,
Jane Malalane <jane.malalane@citrix.com>,
"Mario Limonciello" <mario.limonciello@amd.com>,
<linux-kernel@vger.kernel.org>
Cc: <Jinzhou.Su@amd.com>, <Li.Meng@amd.com>, <linux-pm@vger.kernel.org>
Subject: [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors
Date: Tue, 14 Jun 2022 04:52:54 -0400 [thread overview]
Message-ID: <20220614085255.256600-1-Perry.Yuan@amd.com> (raw)
In order to get the corrent highest perf for some new AMD processors,
the amd_get_highest_perf() call will check the CPU model and
return correct highest perf value.
Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
---
arch/x86/kernel/cpu/amd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 0c0b09796ced..ff2075f26ef4 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1152,7 +1152,8 @@ u32 amd_get_highest_perf(void)
struct cpuinfo_x86 *c = &boot_cpu_data;
if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) ||
- (c->x86_model >= 0x70 && c->x86_model < 0x80)))
+ (c->x86_model >= 0x70 && c->x86_model < 0x80) ||
+ (c->x86_model >= 0xa0 && c->x86_model < 0xb0)))
return 166;
if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) ||
--
2.25.1
next reply other threads:[~2022-06-14 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 8:52 Perry Yuan [this message]
2022-06-15 4:17 ` [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors Huang Rui
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=20220614085255.256600-1-Perry.Yuan@amd.com \
--to=perry.yuan@amd.com \
--cc=Jinzhou.Su@amd.com \
--cc=Li.Meng@amd.com \
--cc=Ray.Huang@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jane.malalane@citrix.com \
--cc=kim.phillips@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).