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)
commita002b864125470c6fd0737fbbdec0c250ead96a3
tree278fdc638cd1174ab5d44832b4bc480e889d4719
parent9287df4362941f7ef1e8dd7cff6b3f2618fdb5b1
s390/smp: cleanup target CPU callback starting

[ Upstream commit dc2ab23b992c9d5dab93b9bf01b10b10465e537e ]

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