public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@nvidia.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alex@ghiti.fr, yury.norov@gmail.com, linux@rasmusvillemoes.dk,
	arnd@arndb.de, akpm@linux-foundation.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, david.laight.linux@gmail.com,
	nathan@kernel.org, cp0613@linux.alibaba.com
Subject: Re: [PATCH v5 0/3] arch/riscv: Add bitrev.h file to support rev8 and brev8
Date: Mon, 27 Apr 2026 16:18:14 -0400	[thread overview]
Message-ID: <ae_EhtFaeAPxpsDd@yury> (raw)
In-Reply-To: <20260421130752.607500-1-ruanjinjie@huawei.com>

On Tue, Apr 21, 2026 at 09:07:49PM +0800, Jinjie Ruan wrote:
> Add bitrev.h file to support rev8 and brev8 for riscv.
> 
> Tested functionally on riscv64 QEMU with:
> 	"-M virt,acpi=on,zbkb=true,zbb=true"
 
Applied in bitmap-for-next. Thanks!

> Changes in v5:
> - Rename NEED_BYTE_REV_TABLE to GENERIC_BITREVERSE.
> - Add help text and make GENERIC_BITREVERSE depends on BITREVERSE, and
>   use def_bool.
> - Split into three patches.
> - Add suggested-by.
> 
> Changes in v4:
> - Update the riscv implementation as David suggested.
> - Add new config called NEED_BYTE_REV_TABLE as David suggested to avoid
>   bloating the .data section for architectures that have full hardware
>   bit-reverse support and don't need the table.
> 
> Changes in v3:
> - Fix the build issue by remving the CONFIG_HAVE_ARCH_BITREVERSE macro
>   for byte_rev_table.
> - Update the riscv implementation as David suggested.
> - Add Reviwed-by.
> 
> Changes in v2:
> - Define generic __bitrev8/16/32 for reuse in riscv.
> 
> Jinjie Ruan (3):
>   lib/bitrev: Introduce GENERIC_BITREVERSE and cleanup Kconfig
>   bitops: Define generic __bitrev8/16/32 for reuse
>   arch/riscv: Add bitrev.h file to support rev8 and brev8
> 
>  arch/riscv/Kconfig                    |  2 ++
>  arch/riscv/include/asm/bitrev.h       | 51 +++++++++++++++++++++++++++
>  include/asm-generic/bitops/__bitrev.h | 25 +++++++++++++
>  include/linux/bitrev.h                | 20 +++--------
>  lib/Kconfig                           | 18 ++++++++++
>  lib/bitrev.c                          |  4 +--
>  6 files changed, 102 insertions(+), 18 deletions(-)
>  create mode 100644 arch/riscv/include/asm/bitrev.h
>  create mode 100644 include/asm-generic/bitops/__bitrev.h
> 
> -- 
> 2.34.1

      parent reply	other threads:[~2026-04-27 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 13:07 [PATCH v5 0/3] arch/riscv: Add bitrev.h file to support rev8 and brev8 Jinjie Ruan
2026-04-21 13:07 ` [PATCH v5 1/3] lib/bitrev: Introduce GENERIC_BITREVERSE and cleanup Kconfig Jinjie Ruan
2026-04-21 13:07 ` [PATCH v5 2/3] bitops: Define generic __bitrev8/16/32 for reuse Jinjie Ruan
2026-04-21 13:07 ` [PATCH v5 3/3] arch/riscv: Add bitrev.h file to support rev8 and brev8 Jinjie Ruan
2026-04-27 20:18 ` Yury Norov [this message]

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=ae_EhtFaeAPxpsDd@yury \
    --to=ynorov@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=cp0613@linux.alibaba.com \
    --cc=david.laight.linux@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nathan@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox