OSDN Git Service

MIPS: Use Kconfig to select CPU_NO_EFFICIENT_FFS
authorPaul Burton <paul.burton@mips.com>
Thu, 8 Nov 2018 23:44:55 +0000 (23:44 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 12 Nov 2018 22:26:16 +0000 (14:26 -0800)
commit57eeacede4db235891ddc37544262413f909763e
treecf373c0297e703460de5348b34a50efa9e53ed2a
parent47bf2b031754ce6f02345a0353f21def75ccd5fc
MIPS: Use Kconfig to select CPU_NO_EFFICIENT_FFS

Select CONFIG_CPU_NO_EFFICIENT_FFS via Kconfig when the kernel is
configured for a pre-MIPS32r1 CPU, rather than defining its equivalent
in asm/cpu-features.h based upon overrides of cpu_has_mips* macros.

The latter only works if a platform has an cpu-feature-overrides.h
header which defines cpu_has_mips* macros, which are not generally
needed. There are many cases where we know that the target ISA for a
kernel build is MIPS32r1 or later & thus includes the CLZ instruction,
without requiring any overrides from the platform. Using Kconfig allows
us to take those into account, and more naturally make a decision about
instruction support using information about the target ISA.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21045/
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
arch/mips/Kconfig
arch/mips/include/asm/cpu-features.h