powerpc: Add support for popcnt instructions
authorAnton Blanchard <anton@samba.org>
Thu, 12 Aug 2010 16:28:09 +0000 (16:28 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 29 Nov 2010 04:48:17 +0000 (15:48 +1100)
commit64ff31287693c1f325cb9cb049569c1611438ef1
tree3c159d2ca6f967fca13bae17cff19f92e0b3896c
parent72083646528d4887b920deb71b37e09bc7d227bb
powerpc: Add support for popcnt instructions

POWER5 added popcntb, and POWER7 added popcntw and popcntd. As a first step
this patch does all the work out of line, but it would be nice to implement
them as inlines with an out of line fallback.

The performance issue with hweight was noticed when disabling SMT on a large
(192 thread) POWER7 box. The patch improves that testcase by about 8%.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/bitops.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/lib/Makefile
arch/powerpc/lib/hweight_64.S [new file with mode: 0644]