Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Anton Blanchard and committed by
Michael Ellerman
423216ed ff2e466a

+2
+2
arch/powerpc/platforms/Kconfig.cputype
··· 116 116 config POWER7_CPU 117 117 bool "POWER7" 118 118 depends on PPC_BOOK3S_64 119 + select ARCH_HAS_FAST_MULTIPLIER 119 120 120 121 config POWER8_CPU 121 122 bool "POWER8" 122 123 depends on PPC_BOOK3S_64 124 + select ARCH_HAS_FAST_MULTIPLIER 123 125 124 126 config E5500_CPU 125 127 bool "Freescale e5500"