Messages in this thread |  | | From | Yury Norov <> | | Subject | | | Date | Wed, 6 May 2026 13:52:01 -0400 |
| |
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
|  |