[PATCH 0/2] x86/cpu/cacheinfo: Simplify llc_id calculation on AMD platforms

From: K Prateek Nayak
Date: Thu Aug 21 2025 - 01:19:51 EST


Reuse the available cacheinfo helpers instead of open-coding masks and
shifts in cacheinfo_amd_init_llc_id().

This series has been tested on top of tip:x86/cpu at commit 6a42c31ef324
("x86/cpu: Rename and move CPU model entry for Diamond Rapids") with no
changes being observed in "/sys/kernel/debug/x86/topo/" on a 3rd
Generation EPYC platform.

---
K Prateek Nayak (2):
x86/cpu/cacheinfo: Convert get_cache_id() to use APIC ID and return
Cache ID
x86/cpu/cacheinfo: Simplify cacheinfo_amd_init_llc_id() using
_cpuid4_info

arch/x86/kernel/cpu/cacheinfo.c | 47 ++++++++++++++-------------------
1 file changed, 20 insertions(+), 27 deletions(-)


base-commit: 6a42c31ef324476fb304e137fe71870fcc538c88
--
2.34.1