forked from Minki/linux
powerpc/64s: update cpu selection options
Update the 64s GENERIC_CPU option. POWER4 support has been dropped, so make that clear in the option name. The POWER5_CPU option is dropped because it's uncommon, and GENERIC_CPU covers it. -mtune= before power8 is dropped because the minimum gcc version supports power8, and tuning is made consistent between big and little endian. A 970 option is added for PowerPC 970 / G5 because they still have a user base, and -mtune=power8 does not generate good code for the 970. This also updates the ISA versions document to add Power4/Power4+ because I didn't realise Power4+ used 2.01. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220921014103.587954-2-npiggin@gmail.com
This commit is contained in:
parent
58ec7f06b7
commit
7fd123e544
@ -4,6 +4,8 @@ CPU to ISA Version Mapping
|
|||||||
|
|
||||||
Mapping of some CPU versions to relevant ISA versions.
|
Mapping of some CPU versions to relevant ISA versions.
|
||||||
|
|
||||||
|
Note Power4 and Power4+ are not supported.
|
||||||
|
|
||||||
========= ====================================================================
|
========= ====================================================================
|
||||||
CPU Architecture version
|
CPU Architecture version
|
||||||
========= ====================================================================
|
========= ====================================================================
|
||||||
@ -26,6 +28,12 @@ PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
|
|||||||
- PowerPC Virtual Environment Architecture Book II v2.01
|
- PowerPC Virtual Environment Architecture Book II v2.01
|
||||||
- PowerPC Operating Environment Architecture Book III v2.01
|
- PowerPC Operating Environment Architecture Book III v2.01
|
||||||
- Plus Altivec/VMX ~= 2.03
|
- Plus Altivec/VMX ~= 2.03
|
||||||
|
Power4+ - PowerPC User Instruction Set Architecture Book I v2.01
|
||||||
|
- PowerPC Virtual Environment Architecture Book II v2.01
|
||||||
|
- PowerPC Operating Environment Architecture Book III v2.01
|
||||||
|
Power4 - PowerPC User Instruction Set Architecture Book I v2.00
|
||||||
|
- PowerPC Virtual Environment Architecture Book II v2.00
|
||||||
|
- PowerPC Operating Environment Architecture Book III v2.00
|
||||||
========= ====================================================================
|
========= ====================================================================
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +56,8 @@ Power5++ No
|
|||||||
Power5+ No
|
Power5+ No
|
||||||
Power5 No
|
Power5 No
|
||||||
PPC970 Yes
|
PPC970 Yes
|
||||||
|
Power4+ No
|
||||||
|
Power4 No
|
||||||
========== ==================
|
========== ==================
|
||||||
|
|
||||||
========== ====
|
========== ====
|
||||||
@ -66,6 +76,8 @@ Power5++ No
|
|||||||
Power5+ No
|
Power5+ No
|
||||||
Power5 No
|
Power5 No
|
||||||
PPC970 No
|
PPC970 No
|
||||||
|
Power4+ No
|
||||||
|
Power4 No
|
||||||
========== ====
|
========== ====
|
||||||
|
|
||||||
========== ====================================
|
========== ====================================
|
||||||
@ -84,4 +96,6 @@ Power5++ No
|
|||||||
Power5+ No
|
Power5+ No
|
||||||
Power5 No
|
Power5 No
|
||||||
PPC970 No
|
PPC970 No
|
||||||
|
Power4+ No
|
||||||
|
Power4 No
|
||||||
========== ====================================
|
========== ====================================
|
||||||
|
@ -149,11 +149,12 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
|
|||||||
ifdef CONFIG_PPC_BOOK3S_64
|
ifdef CONFIG_PPC_BOOK3S_64
|
||||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
|
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
|
|
||||||
else
|
else
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
|
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
|
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
|
||||||
endif
|
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
|
else ifdef CONFIG_PPC_BOOK3E_64
|
||||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
||||||
endif
|
endif
|
||||||
|
@ -126,7 +126,7 @@ choice
|
|||||||
If unsure, select Generic.
|
If unsure, select Generic.
|
||||||
|
|
||||||
config GENERIC_CPU
|
config GENERIC_CPU
|
||||||
bool "Generic (POWER4 and above)"
|
bool "Generic (POWER5 and PowerPC 970 and above)"
|
||||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||||
select PPC_64S_HASH_MMU
|
select PPC_64S_HASH_MMU
|
||||||
|
|
||||||
@ -145,8 +145,8 @@ config CELL_CPU
|
|||||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||||
select PPC_64S_HASH_MMU
|
select PPC_64S_HASH_MMU
|
||||||
|
|
||||||
config POWER5_CPU
|
config PPC_970_CPU
|
||||||
bool "POWER5"
|
bool "PowerPC 970 (including PowerPC G5)"
|
||||||
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
|
||||||
select PPC_64S_HASH_MMU
|
select PPC_64S_HASH_MMU
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ config TARGET_CPU
|
|||||||
string
|
string
|
||||||
depends on TARGET_CPU_BOOL
|
depends on TARGET_CPU_BOOL
|
||||||
default "cell" if CELL_CPU
|
default "cell" if CELL_CPU
|
||||||
default "power5" if POWER5_CPU
|
default "970" if PPC_970_CPU
|
||||||
default "power6" if POWER6_CPU
|
default "power6" if POWER6_CPU
|
||||||
default "power7" if POWER7_CPU
|
default "power7" if POWER7_CPU
|
||||||
default "power8" if POWER8_CPU
|
default "power8" if POWER8_CPU
|
||||||
|
Loading…
Reference in New Issue
Block a user