Skip to content

Commit 6a859f1

Browse files
masahir0ymaddy-kerneldev
authored andcommitted
powerpc: unify two CONFIG_POWERPC64_CPU entries in the same choice block
There are two CONFIG_POWERPC64_CPU entries in the "CPU selection" choice block. I guess the intent is to display a different prompt depending on CPU_LITTLE_ENDIAN: "Generic (POWER5 and PowerPC 970 and above)" for big endian, and "Generic (POWER8 and above)" for little endian. I stumbled on this tricky use case, and worked around it on Kconfig with commit 4d46b5b ("kconfig: fix infinite loop in sym_calc_choice()"). However, I doubt that supporting multiple entries with the same symbol in a choice block is worth the complexity - this is the only such case in the kernel tree. This commit merges the two entries. Once this cleanup is accepted in the powerpc subsystem, I will proceed to refactor the Kconfig parser. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250607102005.1965409-1-masahiroy@kernel.org
1 parent eb59d4c commit 6a859f1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

arch/powerpc/platforms/Kconfig.cputype

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,11 @@ choice
122122
If unsure, select Generic.
123123

124124
config POWERPC64_CPU
125-
bool "Generic (POWER5 and PowerPC 970 and above)"
126-
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
127-
select PPC_64S_HASH_MMU
128-
129-
config POWERPC64_CPU
130-
bool "Generic (POWER8 and above)"
131-
depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
132-
select ARCH_HAS_FAST_MULTIPLIER
125+
bool "Generic 64 bits powerpc"
126+
depends on PPC_BOOK3S_64
127+
select ARCH_HAS_FAST_MULTIPLIER if CPU_LITTLE_ENDIAN
133128
select PPC_64S_HASH_MMU
134-
select PPC_HAS_LBARX_LHARX
129+
select PPC_HAS_LBARX_LHARX if CPU_LITTLE_ENDIAN
135130

136131
config POWERPC_CPU
137132
bool "Generic 32 bits powerpc"

0 commit comments

Comments
 (0)