android_kernel_samsung_a7y1.../arch/s390
Heiko Carstens 6e3037ab2a s390/smp: fix physical to logical CPU map for SMT
[ Upstream commit 72a81ad9d6d62dcb79f7e8ad66ffd1c768b72026 ]

If an SMT capable system is not IPL'ed from the first CPU the setup of
the physical to logical CPU mapping is broken: the IPL core gets CPU
number 0, but then the next core gets CPU number 1. Correct would be
that all SMT threads of CPU 0 get the subsequent logical CPU numbers.

This is important since a lot of code (like e.g. the CPU topology
code) assumes that CPU maps are setup like this. If the mapping is
broken the system will not IPL due to broken topology masks:

[    1.716341] BUG: arch topology broken
[    1.716342]      the SMT domain not a subset of the MC domain
[    1.716343] BUG: arch topology broken
[    1.716344]      the MC domain not a subset of the BOOK domain

This scenario can usually not happen since LPARs are always IPL'ed
from CPU 0 and also re-IPL is intiated from CPU 0. However older
kernels did initiate re-IPL on an arbitrary CPU. If therefore a re-IPL
from an old kernel into a new kernel is initiated this may lead to
crash.

Fix this by setting up the physical to logical CPU mapping correctly.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:25:06 +02:00
..
appldata
boot
configs
crypto
hypfs hypfs: Fix error number left in struct pointer member 2020-04-07 07:55:11 +02:00
include
kernel s390/smp: fix physical to logical CPU map for SMT 2020-04-07 13:25:06 +02:00
kvm KVM: s390: unregister debug feature on failing arch init 2020-04-07 12:41:46 +02:00
lib
mm s390/cmm: fix information leak in cmm_timeout_handler() 2020-04-07 09:28:26 +02:00
net s390/bpf: use 32-bit index for tail calls 2020-04-06 21:36:20 +02:00
numa
oprofile
pci
defconfig
Kbuild
Kconfig
Kconfig.debug
Makefile