powerpc/64: Set default CPU in Kconfig
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 25 Jan 2023 07:38:59 +0000 (08:38 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 30 Jan 2023 06:41:28 +0000 (17:41 +1100)
commit45f7091aac3546ef8112bf62836650ca0bbf0b79
treebb7a6001cf17e2e0662033949c0cdb8bc497721b
parent37251c7114e1b743b077ca74b93557c1ad92a97e
powerpc/64: Set default CPU in Kconfig

Since commit 0069f3d14e7a ("powerpc/64e: Tie PPC_BOOK3E_64 to
PPC_E500MC"), the only possible BOOK3E/64 are E500, so no need of a
default CPU over the E5500.

When the user selects book3e, they must have an e500 compatible
compiler, and it won't work anymore with the default -mcpu=power64, see
commit d6b551b8f90c ("powerpc/64e: Fix build failure with GCC
12 (unrecognized opcode: `wrteei')").

For book3s/64, replace GENERIC_CPU by POWERPC64_CPU to match the PPC32
POWERPC_CPU, and set a default mpcu value in Kconfig directly.

When a user selects a particular CPU, they must ensure the compiler has
the requested capability. Therefore, remove hidden fallback, instead
offer user the possibility to say they want to use the toolchain
default.

Fixes: d6b551b8f90c ("powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')")
Reported-by: Pali Rohár <pali@kernel.org>
Tested-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/76c11197b058193dcb8e8b26adffba09cfbdab11.1674632329.git.christophe.leroy@csgroup.eu
arch/powerpc/Makefile
arch/powerpc/platforms/Kconfig.cputype