[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230728120931.505785260@linutronix.de>
Date: Fri, 28 Jul 2023 14:13:23 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Tom Lendacky <thomas.lendacky@....com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Dick Kennedy <dick.kennedy@...adcom.com>,
James Smart <james.smart@...adcom.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>,
linux-hwmon@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
Steve Wahl <steve.wahl@....com>,
Mike Travis <mike.travis@....com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Russ Anderson <russ.anderson@....com>
Subject: [patch v2 33/38] x86/cpu: Make topology_amd_node_id() use the actual
node info
Now that everything is converted switch it over and remove the intermediate
operation.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/include/asm/topology.h | 4 ++--
arch/x86/kernel/cpu/topology_common.c | 7 ++-----
2 files changed, 4 insertions(+), 7 deletions(-)
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -136,7 +136,7 @@ extern const struct cpumask *cpu_cluster
#define topology_core_id(cpu) (cpu_data(cpu).topo.core_id)
#define topology_ppin(cpu) (cpu_data(cpu).ppin)
-#define topology_amd_node_id(cpu) (cpu_data(cpu).topo.die_id)
+#define topology_amd_node_id(cpu) (cpu_data(cpu).topo.amd_node_id)
extern unsigned int __max_die_per_package;
@@ -171,7 +171,7 @@ extern unsigned int __amd_nodes_per_pkg;
static inline unsigned int topology_amd_nodes_per_pkg(void)
{
- return __max_die_per_package;
+ return __amd_nodes_per_pkg;
}
extern struct cpumask __cpu_primary_thread_mask;
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -143,9 +143,7 @@ static void topo_set_ids(struct topo_sca
/* Relative core ID */
c->topo.core_id = topo_relative_domain_id(apicid, TOPO_CORE_DOMAIN);
- /* Temporary workaround */
- if (tscan->amd_nodes_per_pkg)
- c->topo.amd_node_id = c->topo.die_id = tscan->amd_node_id;
+ c->topo.amd_node_id = tscan->amd_node_id;
if (c->x86_vendor == X86_VENDOR_AMD)
cpu_topology_fixup_amd(tscan);
@@ -231,6 +229,5 @@ void __init cpu_init_topology(struct cpu
* AMD systems have Nodes per package which cannot be mapped to
* APIC ID (yet).
*/
- if (c->x86_vendor == X86_VENDOR_AMD || c->x86_vendor == X86_VENDOR_HYGON)
- __amd_nodes_per_pkg = __max_die_per_package = tscan.amd_nodes_per_pkg;
+ __amd_nodes_per_pkg = tscan.amd_nodes_per_pkg;
}
Powered by blists - more mailing lists