]> git.baikalelectronics.ru Git - kernel.git/commit
s390/smp: cleanup target CPU callback starting
authorAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 17 Mar 2022 14:03:01 +0000 (15:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:12 +0000 (14:24 +0200)
commit85fca80ca9cb41275cb97f3333fabe981f29081c
tree278fdc638cd1174ab5d44832b4bc480e889d4719
parentc8f47258dd51da251d6df685f9bbf11b6565fb6a
s390/smp: cleanup target CPU callback starting

[ Upstream commit 901fa64cb2d7e2ac4560d168193be9a30c3d2b26 ]

Macro mem_assign_absolute() is used to initialize a target
CPU lowcore callback parameters. But despite the macro name
it writes to the absolute lowcore only if the target CPU is
offline. In case the CPU is online the macro does implicitly
write to the normal memory.

That behaviour is correct, but extremely subtle. Sacrifice
few program bits in favour of clarity and distinguish between
online vs offline CPUs and normal vs absolute lowcore pointer.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/smp.c