All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@nvidia.com>
To: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Arnd Bergmann <arnd@arndb.de>, Eric Biggers <ebiggers@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Jinjie Ruan <ruanjinjie@huawei.com>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-arch@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Cc: Yury Norov <ynorov@nvidia.com>
Subject: 
Date: Wed,  6 May 2026 13:52:01 -0400	[thread overview]
Message-ID: <20260506175207.110893-1-ynorov@nvidia.com> (raw)

Subject: [PATCH v2 0/5] lib: rework bitreverse

Cleanup bitreverse-related Kconfig dependency mechanism, and add new
GENERIC_BITREVERSE option to allow architectures to pick the generic
implementation as a fallback for the arch one.

Make RISCV to pick the generic implementation with the absence of ZBKB.

v1: https://lore.kernel.org/all/20260430211351.658193-1-ynorov@nvidia.com/
v2:
 - don't protect headers with the corresponding configs (Arnd, Erik);
 - make HAVE_ARCH_BITREVERSE conditional on BITREVERSE;
 - make GENERIC_BITREVERSE tri-state (sashiko);
 - re-implement GENERIC_BITREVERSE and it's relation to BITREVERSE and
   HAVE_ARCH_BITREVERSE, thus taking over the authorship;
 - RISCV: select GENERIC_BITREVERSE and HAVE_ARCH_BITREVERSE depending
   on BITREVERSE;

Jinjie Ruan (2):
  bitops: Define generic___bitrev8/16/32 for reuse
  arch/riscv: Add bitrev.h file to support rev8 and brev8

Yury Norov (3):
  arch: select HAVE_ARCH_BITREVERSE conditionally on BITREVERSE
  lib/bitrev: Introduce GENERIC_BITREVERSE
  MAINTAINERS: BITOPS: include bitrev.[ch]

 MAINTAINERS                           |  2 ++
 arch/arm/Kconfig                      |  2 +-
 arch/arm64/Kconfig                    |  2 +-
 arch/loongarch/Kconfig                |  2 +-
 arch/mips/Kconfig                     |  2 +-
 arch/riscv/Kconfig                    |  2 ++
 arch/riscv/include/asm/bitrev.h       | 51 +++++++++++++++++++++++++++
 include/asm-generic/bitops/__bitrev.h | 23 ++++++++++++
 include/linux/bitrev.h                | 20 +++--------
 lib/Kconfig                           | 13 +++++++
 lib/Makefile                          |  2 +-
 lib/bitrev.c                          |  3 --
 12 files changed, 100 insertions(+), 24 deletions(-)
 create mode 100644 arch/riscv/include/asm/bitrev.h
 create mode 100644 include/asm-generic/bitops/__bitrev.h

-- 
2.51.0


WARNING: multiple messages have this Message-ID (diff)
From: Yury Norov <ynorov@nvidia.com>
To: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Arnd Bergmann <arnd@arndb.de>, Eric Biggers <ebiggers@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Jinjie Ruan <ruanjinjie@huawei.com>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-arch@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Cc: Yury Norov <ynorov@nvidia.com>
Subject: 
Date: Wed,  6 May 2026 13:52:01 -0400	[thread overview]
Message-ID: <20260506175207.110893-1-ynorov@nvidia.com> (raw)

Subject: [PATCH v2 0/5] lib: rework bitreverse

Cleanup bitreverse-related Kconfig dependency mechanism, and add new
GENERIC_BITREVERSE option to allow architectures to pick the generic
implementation as a fallback for the arch one.

Make RISCV to pick the generic implementation with the absence of ZBKB.

v1: https://lore.kernel.org/all/20260430211351.658193-1-ynorov@nvidia.com/
v2:
 - don't protect headers with the corresponding configs (Arnd, Erik);
 - make HAVE_ARCH_BITREVERSE conditional on BITREVERSE;
 - make GENERIC_BITREVERSE tri-state (sashiko);
 - re-implement GENERIC_BITREVERSE and it's relation to BITREVERSE and
   HAVE_ARCH_BITREVERSE, thus taking over the authorship;
 - RISCV: select GENERIC_BITREVERSE and HAVE_ARCH_BITREVERSE depending
   on BITREVERSE;

Jinjie Ruan (2):
  bitops: Define generic___bitrev8/16/32 for reuse
  arch/riscv: Add bitrev.h file to support rev8 and brev8

Yury Norov (3):
  arch: select HAVE_ARCH_BITREVERSE conditionally on BITREVERSE
  lib/bitrev: Introduce GENERIC_BITREVERSE
  MAINTAINERS: BITOPS: include bitrev.[ch]

 MAINTAINERS                           |  2 ++
 arch/arm/Kconfig                      |  2 +-
 arch/arm64/Kconfig                    |  2 +-
 arch/loongarch/Kconfig                |  2 +-
 arch/mips/Kconfig                     |  2 +-
 arch/riscv/Kconfig                    |  2 ++
 arch/riscv/include/asm/bitrev.h       | 51 +++++++++++++++++++++++++++
 include/asm-generic/bitops/__bitrev.h | 23 ++++++++++++
 include/linux/bitrev.h                | 20 +++--------
 lib/Kconfig                           | 13 +++++++
 lib/Makefile                          |  2 +-
 lib/bitrev.c                          |  3 --
 12 files changed, 100 insertions(+), 24 deletions(-)
 create mode 100644 arch/riscv/include/asm/bitrev.h
 create mode 100644 include/asm-generic/bitops/__bitrev.h

-- 
2.51.0


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

             reply	other threads:[~2026-05-06 17:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 17:52 Yury Norov [this message]
2026-05-06 17:52 ` Yury Norov
2026-05-06 17:52 ` [PATCH v2 1/5] arch: select HAVE_ARCH_BITREVERSE conditionally on BITREVERSE Yury Norov
2026-05-06 17:52   ` Yury Norov
2026-05-06 21:37   ` sashiko-bot
2026-05-12  2:25   ` Yury Norov
2026-05-12  2:25     ` Yury Norov
2026-05-19 22:20     ` Yury Norov
2026-05-19 22:20       ` Yury Norov
2026-06-09  1:26   ` Jinjie Ruan
2026-06-09  1:26     ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 2/5] lib/bitrev: Introduce GENERIC_BITREVERSE Yury Norov
2026-05-06 17:52   ` Yury Norov
2026-05-06 21:49   ` sashiko-bot
2026-06-09  1:53   ` Jinjie Ruan
2026-06-09  1:53     ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 3/5] bitops: Define generic___bitrev8/16/32 for reuse Yury Norov
2026-05-06 17:52   ` Yury Norov
2026-05-06 17:52 ` [PATCH v2 4/5] arch/riscv: Add bitrev.h file to support rev8 and brev8 Yury Norov
2026-05-06 17:52   ` Yury Norov
2026-05-06 22:23   ` sashiko-bot
2026-06-09  1:38   ` Jinjie Ruan
2026-06-09  1:38     ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 5/5] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov
2026-05-06 17:52   ` Yury Norov

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=20260506175207.110893-1-ynorov@nvidia.com \
    --to=ynorov@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=andrew+netdev@lunn.ch \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=sdf@fomichev.me \
    --cc=yury.norov@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.