linux-stable/arch
Ricardo Neri 9677be09e5 x86/cacheinfo: Delete global num_cache_leaves
Linux remembers cpu_cachinfo::num_leaves per CPU, but x86 initializes all
CPUs from the same global "num_cache_leaves".

This is erroneous on systems such as Meteor Lake, where each CPU has a
distinct num_leaves value. Delete the global "num_cache_leaves" and
initialize num_leaves on each CPU.

init_cache_level() no longer needs to set num_leaves. Also, it never had to
set num_levels as it is unnecessary in x86. Keep checking for zero cache
leaves. Such condition indicates a bug.

  [ bp: Cleanup. ]

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org # 6.3+
Link: https://lore.kernel.org/r/20241128002247.26726-3-ricardo.neri-calderon@linux.intel.com
2024-12-06 13:13:36 +01:00
..
alpha Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
arc - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
arm Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
arm64 i2c-for-6.13-rc1-part3 2024-12-01 13:38:24 -08:00
csky - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
hexagon - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
loongarch dmaengine updates for v6.13 2024-11-27 13:25:47 -08:00
m68k RTC for 6.13 2024-11-30 11:18:16 -08:00
microblaze - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
mips Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
nios2 - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
openrisc - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
parisc parisc architecture fixes for kernel v6.13-rc1: 2024-11-26 14:49:20 -08:00
powerpc Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
riscv ARM: 2024-11-30 14:51:08 -08:00
s390 more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
sh sh updates for v6.13 2024-11-30 14:45:29 -08:00
sparc Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
um This pull request contains the following changes for UML: 2024-11-30 10:34:54 -08:00
x86 x86/cacheinfo: Delete global num_cache_leaves 2024-12-06 13:13:36 +01:00
xtensa - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
.gitignore
Kconfig Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00