All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/cpu/hygon: Set __max_die_per_package on Hygon
@ 2021-03-02  2:02 Pu Wen
  2021-03-02 15:08 ` [tip: x86/cpu] " tip-bot2 for Pu Wen
  2021-03-06 12:00 ` tip-bot2 for Pu Wen
  0 siblings, 2 replies; 3+ messages in thread
From: Pu Wen @ 2021-03-02  2:02 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, bp, tglx, mingo, hpa, Yazen.Ghannam,
	johnathan.smithinovic, rkitover, Pu Wen

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip: x86/cpu] x86/cpu/hygon: Set __max_die_per_package on Hygon
  2021-03-02  2:02 [PATCH] x86/cpu/hygon: Set __max_die_per_package on Hygon Pu Wen
@ 2021-03-02 15:08 ` tip-bot2 for Pu Wen
  2021-03-06 12:00 ` tip-bot2 for Pu Wen
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Pu Wen @ 2021-03-02 15:08 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Pu Wen, Borislav Petkov, x86, linux-kernel

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     191d799ecaca4d5c7f87c624ae36581237ab8a87
Gitweb:        https://git.kernel.org/tip/191d799ecaca4d5c7f87c624ae36581237ab8a87
Author:        Pu Wen <puwen@hygon.cn>
AuthorDate:    Tue, 02 Mar 2021 10:02:17 +08:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 02 Mar 2021 15:57:39 +01:00

x86/cpu/hygon: Set __max_die_per_package on Hygon

Set the maximum DIE per package variable on Hygon using the
nodes_per_socket value in order to do per-DIE manipulations for drivers
such as powercap.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210302020217.1827-1-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 ae59115..0bd6c74 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) &&

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip: x86/cpu] x86/cpu/hygon: Set __max_die_per_package on Hygon
  2021-03-02  2:02 [PATCH] x86/cpu/hygon: Set __max_die_per_package on Hygon Pu Wen
  2021-03-02 15:08 ` [tip: x86/cpu] " tip-bot2 for Pu Wen
@ 2021-03-06 12:00 ` tip-bot2 for Pu Wen
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Pu Wen @ 2021-03-06 12:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Pu Wen, Borislav Petkov, Ingo Molnar, x86, linux-kernel

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     59eca2fa1934de42d8aa44d3bef655c92ea69703
Gitweb:        https://git.kernel.org/tip/59eca2fa1934de42d8aa44d3bef655c92ea69703
Author:        Pu Wen <puwen@hygon.cn>
AuthorDate:    Tue, 02 Mar 2021 10:02:17 +08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sat, 06 Mar 2021 12:54:59 +01:00

x86/cpu/hygon: Set __max_die_per_package on Hygon

Set the maximum DIE per package variable on Hygon using the
nodes_per_socket value in order to do per-DIE manipulations for drivers
such as powercap.

Signed-off-by: Pu Wen <puwen@hygon.cn>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20210302020217.1827-1-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 ae59115..0bd6c74 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) &&

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-06 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02  2:02 [PATCH] x86/cpu/hygon: Set __max_die_per_package on Hygon Pu Wen
2021-03-02 15:08 ` [tip: x86/cpu] " tip-bot2 for Pu Wen
2021-03-06 12:00 ` tip-bot2 for Pu Wen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.