MIPS: Enable cpu_has_clo_clz for MIPS Technologies' platforms
authorShinya Kuribayashi <skuribay@pobox.com>
Mon, 12 Jul 2010 15:41:51 +0000 (00:41 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 25 Jul 2011 16:26:55 +0000 (17:26 +0100)
commit5fba0960809534f008260a621046f38a5f46f417
treecf0bdaefabf7b24088c1dd38a3b255ead4b171c6
parentc2b78c8e82f2b8aa0e8703f9931d42ad4f041260
MIPS: Enable cpu_has_clo_clz for MIPS Technologies' platforms

Enable cpu_has_clo_clz only when CONFIG_CPU_MIPS32 or CONFIG_CPU_MIPS64
is selected.  This will optimize fls() and __fls() to use CLZ insn, and
eventually ffs() and __ffs() as well.

Malta and MIPSSim are development platforms, and need to take care of
various processor configurations, release rivisions and so on, even
across different MIPS ISAs.  For such platforms we have to be careful,
for instance, with turning on cpu_has_mips{32,64}r[12] features.

As for CLZ, all MIPS32/64 processors support it, regardless of release
revisions.

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
To: David VomLehn <dvomlehn@cisco.com>
To: macro@linux-mips.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1453/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-malta/cpu-feature-overrides.h
arch/mips/include/asm/mach-mipssim/cpu-feature-overrides.h