From: David Daney Date: Fri, 25 Jun 2010 23:46:08 +0000 (-0700) Subject: MIPS: Octeon: Define ARCH_HAS_USABLE_BUILTIN_POPCOUNT for OCTEON. X-Git-Tag: v2.6.36-rc1~563^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d1929c7662d5da3badcf0df2ca5c9b2dc15db97;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 To: linux-mips@linux-mips.org Cc: David Daney Patchwork: https://patchwork.linux-mips.org/patch/1431/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h index bbf0540..2a7ea90 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h +++ b/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;