]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/cacheinfo: Introduce cpuid_amd_hygon_has_l3_cache()
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:23 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:23:30 +0000 (10:23 +0100)
commit6c963c42fc19d7c9ae9582ab75c3476d1752d979
treedc028c1fc8163b24c3a06f162dcd58c4634c113b
parenteeeebc4fc642f492522e4be92dcaf22119123581
x86/cacheinfo: Introduce cpuid_amd_hygon_has_l3_cache()

Multiple code paths at cacheinfo.c and amd_nb.c check for AMD/Hygon CPUs
L3 cache presensce by directly checking leaf 0x80000006 EDX output.

Extract that logic into its own function.  While at it, rework the
AMD/Hygon LLC topology ID caclculation comments for clarity.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250324133324.23458-29-darwi@linutronix.de
arch/x86/include/asm/cpuid/api.h
arch/x86/kernel/amd_nb.c
arch/x86/kernel/cpu/cacheinfo.c