Commit a73657ea authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64: Add GENERIC_CPU support for little endian

Add GENERIC_CPU support for little-endian rather than using POWER8
specific selection for POWER9 and above.

Restrict GENERIC_CPU to POWER8 and above on little endian.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
[mpe: Duplicate GENERIC_CPU to avoid a kbuild warning about the prompt
      being redefined. Spell out that GENERIC means >= POWER4 for BE.]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 471d7ff8
...@@ -146,8 +146,13 @@ CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) ...@@ -146,8 +146,13 @@ CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata) CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
ifeq ($(CONFIG_PPC_BOOK3S_64),y) ifeq ($(CONFIG_PPC_BOOK3S_64),y)
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power8)
else
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5)) CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4) CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
endif
else else
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
endif endif
......
...@@ -87,7 +87,6 @@ endchoice ...@@ -87,7 +87,6 @@ endchoice
choice choice
prompt "CPU selection" prompt "CPU selection"
depends on PPC64 depends on PPC64
default POWER8_CPU if CPU_LITTLE_ENDIAN
default GENERIC_CPU default GENERIC_CPU
help help
This will create a kernel which is optimised for a particular CPU. This will create a kernel which is optimised for a particular CPU.
...@@ -96,9 +95,14 @@ choice ...@@ -96,9 +95,14 @@ choice
If unsure, select Generic. If unsure, select Generic.
config GENERIC_CPU config GENERIC_CPU
bool "Generic" bool "Generic (POWER4 and above)"
depends on !CPU_LITTLE_ENDIAN depends on !CPU_LITTLE_ENDIAN
config GENERIC_CPU
bool "Generic (POWER8 and above)"
depends on CPU_LITTLE_ENDIAN
select ARCH_HAS_FAST_MULTIPLIER
config CELL_CPU config CELL_CPU
bool "Cell Broadband Engine" bool "Cell Broadband Engine"
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment