From: Pu Wen <puwen@hygon.cn>
To: <x86@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <bp@alien8.de>,
<tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
<Yazen.Ghannam@amd.com>, <johnathan.smithinovic@gmx.at>,
<rkitover@gmail.com>, Pu Wen <puwen@hygon.cn>
Subject: [RFC PATCH] x86/cpu/hygon: Set __max_die_per_package on Hygon
Date: Thu, 25 Feb 2021 21:04:07 +0800 [thread overview]
Message-ID: <20210225130407.21629-1-puwen@hygon.cn> (raw)
Set the maximum DIE per package variable on Hygon using the
nodes_per_socket value in order to do per-DIE manipulations
by driver such as powercap.
Signed-off-by: Pu Wen <puwen@hygon.cn>
---
arch/x86/kernel/cpu/hygon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/hygon.c b/arch/x86/kernel/cpu/hygon.c
index ae59115d18f9..0bd6c74e3ba1 100644
--- a/arch/x86/kernel/cpu/hygon.c
+++ b/arch/x86/kernel/cpu/hygon.c
@@ -215,12 +215,12 @@ static void bsp_init_hygon(struct cpuinfo_x86 *c)
u32 ecx;
ecx = cpuid_ecx(0x8000001e);
- nodes_per_socket = ((ecx >> 8) & 7) + 1;
+ __max_die_per_package = nodes_per_socket = ((ecx >> 8) & 7) + 1;
} else if (boot_cpu_has(X86_FEATURE_NODEID_MSR)) {
u64 value;
rdmsrl(MSR_FAM10H_NODE_ID, value);
- nodes_per_socket = ((value >> 3) & 7) + 1;
+ __max_die_per_package = nodes_per_socket = ((value >> 3) & 7) + 1;
}
if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
--
2.23.0
reply other threads:[~2021-02-25 13:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210225130407.21629-1-puwen@hygon.cn \
--to=puwen@hygon.cn \
--cc=Yazen.Ghannam@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=johnathan.smithinovic@gmx.at \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rkitover@gmail.com \
--cc=tglx@linutronix.de \
--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).