linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Alexander Lobakin <alobakin@pm.me>,
	Alexey Klimov <aklimov@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mips@vger.kernel.org
Cc: Yury Norov <yury.norov@gmail.com>
Subject: [PATCH 2/2] MIPS: enable GENERIC_FIND_FIRST_BIT
Date: Thu, 25 Feb 2021 05:57:00 -0800	[thread overview]
Message-ID: <20210225135700.1381396-3-yury.norov@gmail.com> (raw)
In-Reply-To: <20210225135700.1381396-1-yury.norov@gmail.com>

From: Alexander Lobakin <alobakin@pm.me>

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>
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d89efba3d8a4..164bdd715d4b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -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
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-02-25 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 13:56 [PATCH 0/2] arch: enable GENERIC_FIND_FIRST_BIT for MIPS and ARM64 Yury Norov
2021-02-25 13:56 ` [RESEND PATCH 1/2] ARM64: enable GENERIC_FIND_FIRST_BIT Yury Norov
2021-02-25 14:02   ` Will Deacon
2021-03-03 22:17     ` Yury Norov
2021-03-05 11:20       ` Catalin Marinas
2021-02-25 13:57 ` Yury Norov [this message]
2021-02-26  1:22   ` [PATCH 2/2] MIPS: " Huacai Chen
2021-02-26  4:07     ` Yury Norov
2021-03-01 14:49   ` Thomas Bogendoerfer
2021-03-15 19:14 ` (subset) [PATCH 0/2] arch: enable GENERIC_FIND_FIRST_BIT for MIPS and ARM64 Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210225135700.1381396-3-yury.norov@gmail.com \
    --to=yury.norov@gmail.com \
    --cc=aklimov@redhat.com \
    --cc=alobakin@pm.me \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).