소스 검색

MIPS: Octeon: Define ARCH_HAS_USABLE_BUILTIN_POPCOUNT for OCTEON.

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>
David Daney 15 년 전
부모
커밋
1d1929c766
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h

+ 8 - 0
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h

@@ -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;