MIPS: enable GENERIC_FIND_FIRST_BIT
authorAlexander Lobakin <alobakin@pm.me>
Thu, 25 Feb 2021 13:57:00 +0000 (05:57 -0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sat, 6 Mar 2021 07:43:40 +0000 (08:43 +0100)
MIPS doesn't have architecture-optimized bitsearching functions,
like find_{first,next}_bit() etc.
It's absolutely harmless to enable GENERIC_FIND_FIRST_BIT as this
functionality is not new at all and well-tested. It provides more
optimized code and saves some .text memory (32 R2):

add/remove: 4/1 grow/shrink: 1/53 up/down: 216/-372 (-156)

Users of for_each_set_bit() like hotpath gic_handle_shared_int()
will also benefit from this.

Suggested-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/Kconfig

index 3e0e8f1..f0d412a 100644 (file)
@@ -26,6 +26,7 @@ config MIPS
        select GENERIC_ATOMIC64 if !64BIT
        select GENERIC_CMOS_UPDATE
        select GENERIC_CPU_AUTOPROBE
+       select GENERIC_FIND_FIRST_BIT
        select GENERIC_GETTIMEOFDAY
        select GENERIC_IOMAP
        select GENERIC_IRQ_PROBE