x86/cpu: Encapsulate topology information in cpuinfo_x86
authorThomas Gleixner <tglx@linutronix.de>
Mon, 14 Aug 2023 08:18:29 +0000 (10:18 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 10 Oct 2023 12:38:17 +0000 (14:38 +0200)
commitb9655e702dc5d856e5e05ae414b71708ca98b30c
tree2af444a73974e8a2f4600dc0feecd321d7e512ca
parent965e05ff8af98c44f9937366715c512000373164
x86/cpu: Encapsulate topology information in cpuinfo_x86

The topology related information is randomly scattered across cpuinfo_x86.

Create a new structure cpuinfo_topo and move in a first step initial_apicid
and apicid into it.

Aside of being better readable this is in preparation for replacing the
horribly fragile CPU topology evaluation code further down the road.

Consolidate APIC ID fields to u32 as that represents the hardware type.

No functional change.

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 <mikelley@microsoft.com>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230814085112.269787744@linutronix.de
12 files changed:
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/cacheinfo.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/hygon.c
arch/x86/kernel/cpu/mce/apei.c
arch/x86/kernel/cpu/mce/core.c
arch/x86/kernel/cpu/proc.c
arch/x86/kernel/cpu/topology.c
arch/x86/xen/apic.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/virt/acrn/hsm.c