[patch V4 06/31] bitops: Tile and MIPS (if has usable __builtin_popcount) use popcount parity functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhaoxiu Zeng <zhaoxiu.zeng@xxxxxxxxx>

Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@xxxxxxxxx>
Acked-by: Chris Metcalf <cmetcalf@xxxxxxxxxxxx> [for tile]
---
 arch/mips/include/asm/bitops.h | 7 +++++++
 arch/tile/include/asm/bitops.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h
index ce9666c..4192068 100644
--- a/arch/mips/include/asm/bitops.h
+++ b/arch/mips/include/asm/bitops.h
@@ -626,6 +626,13 @@ static inline int ffs(int word)
 #include <asm/arch_hweight.h>
 #include <asm-generic/bitops/const_hweight.h>
 
+#ifdef ARCH_HAS_USABLE_BUILTIN_POPCOUNT
+#include <asm-generic/bitops/popc-parity.h>
+#else
+#include <asm-generic/bitops/arch_parity.h>
+#endif
+#include <asm-generic/bitops/const_parity.h>
+
 #include <asm-generic/bitops/le.h>
 #include <asm-generic/bitops/ext2-atomic.h>
 
diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h
index 20caa34..4dd89d8 100644
--- a/arch/tile/include/asm/bitops.h
+++ b/arch/tile/include/asm/bitops.h
@@ -85,6 +85,8 @@ static inline unsigned long __arch_hweight64(__u64 w)
 #include <asm-generic/bitops/builtin-__fls.h>
 #include <asm-generic/bitops/builtin-ffs.h>
 #include <asm-generic/bitops/const_hweight.h>
+#include <asm-generic/bitops/popc-parity.h>
+#include <asm-generic/bitops/const_parity.h>
 #include <asm-generic/bitops/lock.h>
 #include <asm-generic/bitops/find.h>
 #include <asm-generic/bitops/sched.h>
-- 
2.7.4






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux