summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/topology_common.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-02-13 22:04:18 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-02-15 22:07:38 +0100
commit03fa6bea5a3e13ccbc211af1fa7e75d34239a408 (patch)
tree1cb96d0ad755d83664065c80c0e0643f92d943b5 /arch/x86/kernel/cpu/topology_common.c
parentd805a6916037a716e858a0a91d844bad1ca8f48b (diff)
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@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Tested-by: Sohil Mehta <sohil.mehta@intel.com> Tested-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Wang Wendy <wendy.wang@intel.com> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Link: https://lore.kernel.org/r/20240212153625.334185785@linutronix.de
Diffstat (limited to 'arch/x86/kernel/cpu/topology_common.c')
-rw-r--r--arch/x86/kernel/cpu/topology_common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c
index ab944d6f973f..afea34d59598 100644
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -151,9 +151,7 @@ static void topo_set_ids(struct topo_scan *tscan)
c->topo.core_id = (apicid & topo_domain_mask(TOPO_PKG_DOMAIN)) >>
x86_topo_system.dom_shifts[TOPO_SMT_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);
@@ -239,6 +237,5 @@ void __init cpu_init_topology(struct cpuinfo_x86 *c)
* AMD systems have Nodes per package which cannot be mapped to
* APIC ID.
*/
- 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;
}