]> git.baikalelectronics.ru Git - kernel.git/commit
x86/CPU/AMD: Fix LLC ID bit-shift calculation
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Wed, 13 Jun 2018 18:43:10 +0000 (13:43 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 22 Jun 2018 19:21:49 +0000 (21:21 +0200)
commit5e109ee81c07c7ab4ae6a4201bb4596635204736
tree4ec8e2677665c624544224831fe0aa9d50c49133
parentf9a406d9eeb5709e5e94472164a15c8a9255a508
x86/CPU/AMD: Fix LLC ID bit-shift calculation

The current logic incorrectly calculates the LLC ID from the APIC ID.

Unless specified otherwise, the LLC ID should be calculated by removing
the Core and Thread ID bits from the least significant end of the APIC
ID. For more info, see "ApicId Enumeration Requirements" in any Fam17h
PPR document.

[ bp: Improve commit message. ]

Fixes: c6d881f1b649 ("Calculate last level cache ID from number of sharing threads")
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/1528915390-30533-1-git-send-email-suravee.suthikulpanit@amd.com
arch/x86/kernel/cpu/cacheinfo.c