powerpc: Add POWER8 CPU selection
PATCH 1/2 powerpc: Add POWER8 CPU selection
This allows the user to build a kernel targeted at POWER8 (ie gcc -mcpu=power8).
Signed-off-by Anton Blanchard <[email protected]>
---
arch/powerpc/Makefile +1 -0
@@ -135,6 +135,7 @@ CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) +CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8) # Altivec option not allowed with e500mc64 in GCC. ifeq ($(CONFIG_ALTIVEC),y)
arch/powerpc/platforms/Kconfig.cputype +4 -0
@@ -117,6 +117,10 @@ config POWER7_CPU bool "POWER7" depends on PPC_BOOK3S_64 +config POWER8_CPU + bool "POWER8" + depends on PPC_BOOK3S_64 + config E5500_CPU bool "Freescale e5500" depends on E500
PATCH 2/2 powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER
I ran some tests to compare hash_64 using shifts and multiplies. The results:
POWER6: ~2x slower
POWER7: ~2x faster
POWER8: ~2x faster
Now we have a proper config option, select CONFIG_ARCH_HAS_FAST_MULTIPLIER on POWER7 and POWER8.
Signed-off-by Anton Blanchard <[email protected]>
---
arch/powerpc/platforms/Kconfig.cputype +2 -0
@@ -116,10 +116,12 @@ config POWER6_CPU config POWER7_CPU bool "POWER7" depends on PPC_BOOK3S_64 + select ARCH_HAS_FAST_MULTIPLIER config POWER8_CPU bool "POWER8" depends on PPC_BOOK3S_64 + select ARCH_HAS_FAST_MULTIPLIER config E5500_CPU bool "Freescale e5500"