diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-06-25 19:46:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 08:26:03 -0400 |
commit | 1d1929c7662d5da3badcf0df2ca5c9b2dc15db97 (patch) | |
tree | 15e91f7ccc3995ff291c146a61fe92325e8afc84 | |
parent | 1a403d1d2e549bc7d280001503867321572717f6 (diff) |
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>
-rw-r--r-- | arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 bbf054042395..2a7ea90fee2a 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) | |||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
79 | 79 | ||
80 | #ifdef __OCTEON__ | ||
81 | /* | ||
82 | * All gcc versions that have OCTEON support define __OCTEON__ and have the | ||
83 | * __builtin_popcount support. | ||
84 | */ | ||
85 | #define ARCH_HAS_USABLE_BUILTIN_POPCOUNT 1 | ||
86 | #endif | ||
87 | |||
80 | static inline int octeon_has_saa(void) | 88 | static inline int octeon_has_saa(void) |
81 | { | 89 | { |
82 | int id; | 90 | int id; |