powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C
authorJordan Niethe <jniethe5@gmail.com>
Wed, 14 Oct 2020 07:28:37 +0000 (18:28 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:05 +0000 (10:54 +0100)
commitf4df6db5b0b8a5d43a7f451385f162df8a45b7ed
tree861428785b312e4723fcbc8261307e85944c96b8
parenta9c9d2ff642365b2740cd159f0fdc42165290af1
powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C

[ Upstream commit 344fbab991a568dc33ad90711b489d870e18d26d ]

The only thing keeping the cpu_setup() and cpu_restore() functions
used in the cputable entries for Power7, Power8, Power9 and Power10 in
assembly was cpu_restore() being called before there was a stack in
generic_secondary_smp_init(). Commit ("powerpc/64: Set up a kernel
stack for secondaries before cpu_restore()") means that it is now
possible to use C.

Rewrite the functions in C so they are a little bit easier to read.
This is not changing their functionality.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
[mpe: Tweak copyright and authorship notes]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201014072837.24539-2-jniethe5@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/cpu_setup_power.h [new file with mode: 0644]
arch/powerpc/kernel/cpu_setup_power.S [deleted file]
arch/powerpc/kernel/cpu_setup_power.c [new file with mode: 0644]
arch/powerpc/kernel/cputable.c