Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-04 Thread Michael Ellerman
On Wed, 25 Jan 2023 08:38:59 +0100, Christophe Leroy wrote:
> Since 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')").
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/64: Set default CPU in Kconfig
  https://git.kernel.org/powerpc/c/45f7091aac3546ef8112bf62836650ca0bbf0b79
[2/2] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage
  https://git.kernel.org/powerpc/c/ff7c76f66d8bad4e694c264c789249e1d3a8205d

cheers


Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-03 Thread Christophe Leroy


Le 03/02/2023 à 18:58, Pali Rohár a écrit :
> On Wednesday 01 February 2023 09:29:45 Nick Desaulniers wrote:
>> On Wed, Feb 1, 2023 at 3:41 AM Christophe Leroy
>>  wrote:
>>>
>>>
>>>
>>> Le 01/02/2023 à 12:31, Naresh Kamboju a écrit :
 Following build regression started from next-20230131.

 Regressions found on powerpc:

 build/clang-nightly-tqm8xx_defconfig
 build/clang-nightly-ppc64e_defconfig


 make --silent --keep-going --jobs=8 
 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
 CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 
 LLVM_IAS=0 tqm8xx_defconfig
 make --silent --keep-going --jobs=8 
 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
 CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 
 LLVM_IAS=0

 error: unknown target CPU '860'
 note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, 
 a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, 
 power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, 
 power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, 
 powerpc64le, ppc64le, future
 make[2]: *** [/builds/linux/scripts/Makefile.build:114: 
 scripts/mod/devicetable-offsets.s] Error 1
 error: unknown target CPU '860'
 note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, 
 a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, 
 power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, 
 power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, 
 powerpc64le, ppc64le, future
 make[2]: *** [/builds/linux/scripts/Makefile.build:252: 
 scripts/mod/empty.o] Error 1
>>>
>>>
>>> On GCC, the possible values are:
>>>
>>> ppc-linux-gcc: note : valid arguments to ‘-mcpu=’ are: 401 403 405 405fp
>>> 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740
>>> 7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2
>>> e300c3 e500mc e500mc64 e5500 e6500 ec603e native power3 power4 power5
>>> power5+ power6 power6x power7 power8 powerpc powerpc64 powerpc64le rs64
>>> titan
>>>
>>> How do you tell CLANG that you are building for powerpc 8xx ?
> 
> Maybe llvm does not have support for this old CPU core at all? Because
> from 'note: valid target CPU values are:' message it looks like that.

By the way I submitted a patch to opt out of CLANG until we clarify the 
situation, see 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/e62892e32c14a7a5738c597e39e0082cb0abf21c.1675335659.git.christophe.le...@csgroup.eu/

Christophe

> 
>> + Nemanjai, Qiongsi,
>>
>>
>>>


 Reported-by: Linux Kernel Functional Testing 

 https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230201/testrun/14479384/suite/build/test/clang-nightly-tqm8xx_defconfig/history/

 The bisection pointed to this commit,
 45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")

 --
 Linaro LKFT
 https://lkft.linaro.org
>>
>>
>>
>> -- 
>> Thanks,
>> ~Nick Desaulniers


Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-03 Thread Pali Rohár
On Wednesday 01 February 2023 09:29:45 Nick Desaulniers wrote:
> On Wed, Feb 1, 2023 at 3:41 AM Christophe Leroy
>  wrote:
> >
> >
> >
> > Le 01/02/2023 à 12:31, Naresh Kamboju a écrit :
> > > Following build regression started from next-20230131.
> > >
> > > Regressions found on powerpc:
> > >
> > >build/clang-nightly-tqm8xx_defconfig
> > >build/clang-nightly-ppc64e_defconfig
> > >
> > >
> > > make --silent --keep-going --jobs=8 
> > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> > > CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 
> > > LLVM_IAS=0 tqm8xx_defconfig
> > > make --silent --keep-going --jobs=8 
> > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> > > CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 
> > > LLVM_IAS=0
> > >
> > > error: unknown target CPU '860'
> > > note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 
> > > 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 
> > > 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, 
> > > pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, 
> > > pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, 
> > > ppc64, powerpc64le, ppc64le, future
> > > make[2]: *** [/builds/linux/scripts/Makefile.build:114: 
> > > scripts/mod/devicetable-offsets.s] Error 1
> > > error: unknown target CPU '860'
> > > note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 
> > > 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 
> > > 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, 
> > > pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, 
> > > pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, 
> > > ppc64, powerpc64le, ppc64le, future
> > > make[2]: *** [/builds/linux/scripts/Makefile.build:252: 
> > > scripts/mod/empty.o] Error 1
> >
> >
> > On GCC, the possible values are:
> >
> > ppc-linux-gcc: note : valid arguments to ‘-mcpu=’ are: 401 403 405 405fp
> > 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740
> > 7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2
> > e300c3 e500mc e500mc64 e5500 e6500 ec603e native power3 power4 power5
> > power5+ power6 power6x power7 power8 powerpc powerpc64 powerpc64le rs64
> > titan
> >
> > How do you tell CLANG that you are building for powerpc 8xx ?

Maybe llvm does not have support for this old CPU core at all? Because
from 'note: valid target CPU values are:' message it looks like that.

> + Nemanjai, Qiongsi,
> 
> 
> >
> > >
> > >
> > > Reported-by: Linux Kernel Functional Testing 
> > >
> > > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230201/testrun/14479384/suite/build/test/clang-nightly-tqm8xx_defconfig/history/
> > >
> > > The bisection pointed to this commit,
> > >45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")
> > >
> > > --
> > > Linaro LKFT
> > > https://lkft.linaro.org
> 
> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers


Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-01 Thread Nick Desaulniers
On Wed, Feb 1, 2023 at 3:41 AM Christophe Leroy
 wrote:
>
>
>
> Le 01/02/2023 à 12:31, Naresh Kamboju a écrit :
> > Following build regression started from next-20230131.
> >
> > Regressions found on powerpc:
> >
> >build/clang-nightly-tqm8xx_defconfig
> >build/clang-nightly-ppc64e_defconfig
> >
> >
> > make --silent --keep-going --jobs=8 
> > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> > CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 
> > LLVM_IAS=0 tqm8xx_defconfig
> > make --silent --keep-going --jobs=8 
> > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> > CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 LLVM_IAS=0
> >
> > error: unknown target CPU '860'
> > note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
> > 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, 
> > a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, 
> > pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, 
> > pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, 
> > ppc64le, future
> > make[2]: *** [/builds/linux/scripts/Makefile.build:114: 
> > scripts/mod/devicetable-offsets.s] Error 1
> > error: unknown target CPU '860'
> > note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
> > 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, 
> > a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, 
> > pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, 
> > pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, 
> > ppc64le, future
> > make[2]: *** [/builds/linux/scripts/Makefile.build:252: 
> > scripts/mod/empty.o] Error 1
>
>
> On GCC, the possible values are:
>
> ppc-linux-gcc: note : valid arguments to ‘-mcpu=’ are: 401 403 405 405fp
> 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740
> 7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2
> e300c3 e500mc e500mc64 e5500 e6500 ec603e native power3 power4 power5
> power5+ power6 power6x power7 power8 powerpc powerpc64 powerpc64le rs64
> titan
>
> How do you tell CLANG that you are building for powerpc 8xx ?

+ Nemanjai, Qiongsi,


>
> >
> >
> > Reported-by: Linux Kernel Functional Testing 
> >
> > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230201/testrun/14479384/suite/build/test/clang-nightly-tqm8xx_defconfig/history/
> >
> > The bisection pointed to this commit,
> >45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")
> >
> > --
> > Linaro LKFT
> > https://lkft.linaro.org



-- 
Thanks,
~Nick Desaulniers


Re: [PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-01 Thread Christophe Leroy


Le 01/02/2023 à 12:31, Naresh Kamboju a écrit :
> Following build regression started from next-20230131.
> 
> Regressions found on powerpc:
> 
>build/clang-nightly-tqm8xx_defconfig
>build/clang-nightly-ppc64e_defconfig
> 
> 
> make --silent --keep-going --jobs=8 
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 LLVM_IAS=0 
> tqm8xx_defconfig
> make --silent --keep-going --jobs=8 
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
> CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 LLVM_IAS=0
> 
> error: unknown target CPU '860'
> note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
> 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, 
> e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, 
> pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, 
> pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, 
> ppc64le, future
> make[2]: *** [/builds/linux/scripts/Makefile.build:114: 
> scripts/mod/devicetable-offsets.s] Error 1
> error: unknown target CPU '860'
> note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
> 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, 
> e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, 
> pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, 
> pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, 
> ppc64le, future
> make[2]: *** [/builds/linux/scripts/Makefile.build:252: scripts/mod/empty.o] 
> Error 1


On GCC, the possible values are:

ppc-linux-gcc: note : valid arguments to ‘-mcpu=’ are: 401 403 405 405fp 
440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 
7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2 
e300c3 e500mc e500mc64 e5500 e6500 ec603e native power3 power4 power5 
power5+ power6 power6x power7 power8 powerpc powerpc64 powerpc64le rs64 
titan

How do you tell CLANG that you are building for powerpc 8xx ?

> 
>  
> Reported-by: Linux Kernel Functional Testing 
> 
> https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230201/testrun/14479384/suite/build/test/clang-nightly-tqm8xx_defconfig/history/
> 
> The bisection pointed to this commit,
>45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")
> 
> --
> Linaro LKFT
> https://lkft.linaro.org


[PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-02-01 Thread Naresh Kamboju
Following build regression started from next-20230131.

Regressions found on powerpc:

  build/clang-nightly-tqm8xx_defconfig
  build/clang-nightly-ppc64e_defconfig


make --silent --keep-going --jobs=8 
O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 LLVM_IAS=0 
tqm8xx_defconfig
make --silent --keep-going --jobs=8 
O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc 
CROSS_COMPILE=powerpc64le-linux-gnu- HOSTCC=clang CC=clang LLVM=1 LLVM_IAS=0

error: unknown target CPU '860'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, 
e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, 
power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, 
power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, 
future
make[2]: *** [/builds/linux/scripts/Makefile.build:114: 
scripts/mod/devicetable-offsets.s] Error 1
error: unknown target CPU '860'
note: valid target CPU values are: generic, 440, 450, 601, 602, 603, 603e, 
603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, 
e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, 
power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, 
power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, 
future
make[2]: *** [/builds/linux/scripts/Makefile.build:252: scripts/mod/empty.o] 
Error 1


Reported-by: Linux Kernel Functional Testing 

https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230201/testrun/14479384/suite/build/test/clang-nightly-tqm8xx_defconfig/history/

The bisection pointed to this commit,
  45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")

--
Linaro LKFT
https://lkft.linaro.org


[PATCH 1/2] powerpc/64: Set default CPU in Kconfig

2023-01-24 Thread Christophe Leroy
Since 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 
Tested-by: Pali Rohár 
Signed-off-by: Christophe Leroy 
Signed-off-by: Michael Ellerman 
Link: 
https://lore.kernel.org/r/3fd60c2d8a28668a42b766b18362a526ef47e757.1670420281.git.christophe.le...@csgroup.eu
---
 arch/powerpc/Makefile  | 22 +-
 arch/powerpc/platforms/Kconfig.cputype | 12 +++-
 2 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index dc4cbf0a5ca9..bf5f0a998273 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -146,19 +146,6 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option, 
$(MULTIPLEWORD))
 
 CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
 
-ifdef CONFIG_PPC_BOOK3S_64
-ifdef CONFIG_CPU_LITTLE_ENDIAN
-CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
-else
-CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
-endif
-CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10,   \
- $(call cc-option,-mtune=power9,   \
- $(call cc-option,-mtune=power8)))
-else ifdef CONFIG_PPC_BOOK3E_64
-CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
-endif
-
 ifdef CONFIG_FUNCTION_TRACER
 CC_FLAGS_FTRACE := -pg
 ifdef CONFIG_MPROFILE_KERNEL
@@ -166,11 +153,12 @@ CC_FLAGS_FTRACE += -mprofile-kernel
 endif
 endif
 
-CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call 
cc-option,-mcpu=$(CONFIG_TARGET_CPU))
-AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call 
cc-option,-mcpu=$(CONFIG_TARGET_CPU))
+CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
+AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
 
-CFLAGS-$(CONFIG_E5500_CPU) += $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
-CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
+CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \
+ $(call cc-option,-mtune=power9,   \
+ $(call cc-option,-mtune=power8)))
 
 asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
 
diff --git a/arch/powerpc/platforms/Kconfig.cputype 
b/arch/powerpc/platforms/Kconfig.cputype
index 9563336e3348..31cea2eeb59e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -118,19 +118,18 @@ endchoice
 
 choice
prompt "CPU selection"
-   default GENERIC_CPU
help
  This will create a kernel which is optimised for a particular CPU.
  The resulting kernel may not run on other CPUs, so use this with care.
 
  If unsure, select Generic.
 
-config GENERIC_CPU
+config POWERPC64_CPU
bool "Generic (POWER5 and PowerPC 970 and above)"
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
select PPC_64S_HASH_MMU
 
-config GENERIC_CPU
+config POWERPC64_CPU
bool "Generic (POWER8 and above)"
depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
select ARCH_HAS_FAST_MULTIPLIER
@@ -233,13 +232,12 @@ config E500MC_CPU
 
 config TOOLCHAIN_DEFAULT_CPU
bool "Rely on the toolchain's implicit default CPU"
-   depends on PPC32
 
 endchoice
 
 config TARGET_CPU_BOOL
bool
-   default !GENERIC_CPU && !TOOLCHAIN_DEFAULT_CPU
+   default !TOOLCHAIN_DEFAULT_CPU
 
 config TARGET_CPU
string
@@ -251,6 +249,10 @@ config TARGET_CPU
default "power8" if POWER8_CPU
default "power9" if POWER9_CPU
default "power10" if POWER10_CPU
+   default "e500mc64" if E5500_CPU
+   default "e6500" if E6500_CPU
+   default "power4" if POWERPC64_CPU && !CPU_LITTLE_ENDIAN
+   default "power8" if POWERPC64_CPU && CPU_LITTLE_ENDIAN
default "405" if 405_CPU
default "440" if 440_CPU
default "464" if 464_CPU
-- 
2.38.1