x86/cpu/topology: Provide logical pkg/die mapping
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Feb 2024 21:06:07 +0000 (22:06 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 Feb 2024 21:07:44 +0000 (22:07 +0100)
commitb7065f4f844c7876ed071b67e2ba57838152bd63
tree546d6ab2b9e1c34156b64be639e825fb35e8b1a0
parent5e40fb2d4a4c7503cab4f923b7d985dbcf583581
x86/cpu/topology: Provide logical pkg/die mapping

With the topology bitmaps in place the logical package and die IDs can
trivially be retrieved by determining the bitmap weight of the relevant
topology domain level up to and including the physical ID in question.

Provide a function to that effect.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20240213210252.846136196@linutronix.de
arch/x86/include/asm/topology.h
arch/x86/kernel/cpu/topology.c