diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-06-25 16:46:07 -0700 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 13:26:02 +0100 |
commit | 1a403d1d2e549bc7d280001503867321572717f6 (patch) | |
tree | e96d31e561f13695e591cd2eadd116c4994624e6 /arch/mips/include/asm/bitops.h | |
parent | d16f7093b6eb4f3859856f6ee4ab504cbeeea0b9 (diff) | |
download | op-kernel-dev-1a403d1d2e549bc7d280001503867321572717f6.zip op-kernel-dev-1a403d1d2e549bc7d280001503867321572717f6.tar.gz |
MIPS: Create and use asm/arch_hweight.h
Some MIPS ISA processor varients can do hweight operations
efficiently.
Split arch_hweight.h into a seperate file, and implement the
operations with __builtin_popcount{,ll} if supported.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Cc: David Daney <ddaney@caviumnetworks.com>
Patchwork: https://patchwork.linux-mips.org/patch/1430/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/bitops.h')
-rw-r--r-- | arch/mips/include/asm/bitops.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index 9255cfb..b0ce7ca 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -700,7 +700,10 @@ static inline int ffs(int word) #ifdef __KERNEL__ #include <asm-generic/bitops/sched.h> -#include <asm-generic/bitops/hweight.h> + +#include <asm/arch_hweight.h> +#include <asm-generic/bitops/const_hweight.h> + #include <asm-generic/bitops/ext2-non-atomic.h> #include <asm-generic/bitops/ext2-atomic.h> #include <asm-generic/bitops/minix.h> |