linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc: Add POWER8 CPU selection
@ 2014-09-16  0:47 Anton Blanchard
  2014-09-16  0:49 ` [PATCH 2/2] powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER Anton Blanchard
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2014-09-16  0:47 UTC (permalink / raw)
  To: benh, paulus, michael, torvalds; +Cc: linuxppc-dev, linux-kernel

This allows the user to build a kernel targeted at POWER8
(ie gcc -mcpu=power8).

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: b/arch/powerpc/Makefile
===================================================================
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -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)
Index: b/arch/powerpc/platforms/Kconfig.cputype
===================================================================
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER
  2014-09-16  0:47 [PATCH 1/2] powerpc: Add POWER8 CPU selection Anton Blanchard
@ 2014-09-16  0:49 ` Anton Blanchard
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2014-09-16  0:49 UTC (permalink / raw)
  To: benh, paulus, michael, torvalds; +Cc: linuxppc-dev, linux-kernel

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 <anton@samba.org>
---

Index: b/arch/powerpc/platforms/Kconfig.cputype
===================================================================
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -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"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-16  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16  0:47 [PATCH 1/2] powerpc: Add POWER8 CPU selection Anton Blanchard
2014-09-16  0:49 ` [PATCH 2/2] powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).