]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/cache: prevent rebuild of shared_cpu_list
authorHeiko Carstens <hca@linux.ibm.com>
Sat, 2 Mar 2024 19:22:09 +0000 (20:22 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:38 +0000 (18:19 -0400)
commiteabb38ad015e84342fc2c4eeaa958d5d95cb5922
tree050259ca95c33b97962c3a3e8d61b6304b5cbac9
parente39a3a14eafcf17f03c037290b78c8f483529028
s390/cache: prevent rebuild of shared_cpu_list

[ Upstream commit cb0cd4ee11142339f2d47eef6db274290b7a482d ]

With commit 36bbc5b4ffab ("cacheinfo: Allow early detection and population
of cache attributes") the shared cpu list for each cache level higher than
L1 is rebuilt even if the list already has been set up.

This is caused by the removal of the cpumask_empty() check within
cache_shared_cpu_map_setup().

However architectures can enforce that the shared cpu list is not rebuilt
by simply setting cpu_map_populated of the per cpu cache info structure to
true, which is also the fix for this problem.

Before:
$ cat /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list
0-7

After:
$ cat /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list
1

Fixes: 36bbc5b4ffab ("cacheinfo: Allow early detection and population of cache attributes")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/cache.c