]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/CPU/AMD: Calculate last level cache ID from number of sharing threads
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Fri, 27 Apr 2018 21:34:37 +0000 (16:34 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 6 May 2018 10:49:15 +0000 (12:49 +0200)
commit68091ee7ac3c1a8786fe1bebbd616b14236efb99
tree368d443c105928aba52b17c236f376bf048d8f62
parent1d200c078d0e3e49e2995b9d25fef8926d491f4f
x86/CPU/AMD: Calculate last level cache ID from number of sharing threads

Last Level Cache ID can be calculated from the number of threads sharing
the cache, which is available from CPUID Fn0x8000001D (Cache Properties).
This is used to left-shift the APIC ID to derive LLC ID.

Therefore, default to this method unless the APIC ID enumeration does not
follow the scheme.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1524864877-111962-5-git-send-email-suravee.suthikulpanit@amd.com
arch/x86/include/asm/cacheinfo.h [new file with mode: 0644]
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/cacheinfo.c