MIPS: Octeon: Define ARCH_HAS_USABLE_BUILTIN_POPCOUNT for OCTEON.
authorDavid Daney <ddaney@caviumnetworks.com>
Fri, 25 Jun 2010 23:46:08 +0000 (16:46 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 5 Aug 2010 12:26:03 +0000 (13:26 +0100)
OCTEON implements __builtin_popcount with a single instruction, so lets use it.

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/1431/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h

index bbf05404239565927c2f4bea282863cf4766b132..2a7ea90fee2a7530eb278613724da913014981b0 100644 (file)
@@ -77,6 +77,14 @@ static inline int read_current_timer(unsigned long *result)
        return 0;
 }
 
+#ifdef __OCTEON__
+/*
+ * All gcc versions that have OCTEON support define __OCTEON__ and have the
+ *  __builtin_popcount support.
+ */
+#define ARCH_HAS_USABLE_BUILTIN_POPCOUNT 1
+#endif
+
 static inline int octeon_has_saa(void)
 {
        int id;