[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462957850-24540-1-git-send-email-zengzhaoxiu@163.com>
Date: Wed, 11 May 2016 17:10:47 +0800
From: zengzhaoxiu@....com
To: linux-kernel@...r.kernel.org
Cc: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Chris Metcalf <cmetcalf@...lanox.com>,
Leonid Yegoshin <Leonid.Yegoshin@...tec.com>,
linux-mips@...ux-mips.org
Subject: [patch V4 06/31] bitops: Tile and MIPS (if has usable __builtin_popcount) use popcount parity functions
From: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
Acked-by: Chris Metcalf <cmetcalf@...lanox.com> [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
Powered by blists - more mailing lists