Skip to content

lib: rework bitreverse

Yury Norov bpf linux-arch linux-riscv lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 9 repliesIn review 1 of 6 applied

Patches in v1 1 of 6 applied

#Subject and filesSizeRepliesApplied
1/6lib: include crc32.h conditionally on CONFIG_CRC32include/linux/etherdevice.h+4 -08 replies
2/6lib/bitrev: Introduce GENERIC_BITREVERSE and cleanup Kconfiglib/Kconfig lib/bitrev.c+20 -20 replies
3/6bitops: Define generic __bitrev8/16/32 for reuseinclude/asm-generic/bitops/__bitrev.h include/linux/bitrev.h+29 -160 replies
4/6arch/riscv: Add bitrev.h file to support rev8 and brev8arch/riscv/Kconfig arch/riscv/include/asm/bitrev.h+53 -00 replies
5/6lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSElib/Makefile lib/bitrev.c+1 -40 replies
6/6MAINTAINERS: BITOPS: include bitrev.[ch]MAINTAINERS+2 -00 repliesApplied

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchYury Norov
1/6
2/6
3/6R-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] lib: rework bitreverse

This series is a resend for Jinjie Ruan's "arch/riscv: Add bitrev.h file to support rev8 and brev8" [1], my follow-up "lib: compile generic bitrev based on GENERIC_BITREVERSE" [2], and the fix for a build error reported by Nathan Chancellor [3].

No changes, except for combining pieces together and rebasing on top of the tree.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/20260429202922.GA3575295@ax162/

Build-tested against x86 tinyconfig and defconfig, having disabled and enabiled CRC32 and BITREVERSE, correspondingly.

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

Yury Norov (3):
lib: include crc32.h conditionally on CONFIG_CRC32
lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSE
MAINTAINERS: BITOPS: include bitrev.[ch]

 MAINTAINERS                           |  2 ++
 arch/riscv/Kconfig                    |  2 ++
 arch/riscv/include/asm/bitrev.h       | 51 +++++++++++++++++++++++++++
 include/asm-generic/bitops/__bitrev.h | 25 +++++++++++++
 include/linux/bitrev.h                | 20 +++--------
 include/linux/etherdevice.h           |  4 +++
 lib/Kconfig                           | 18 ++++++++++
 lib/Makefile                          |  2 +-
 lib/bitrev.c                          |  3 --
 9 files changed, 107 insertions(+), 20 deletions(-)
 create mode 100644 arch/riscv/include/asm/bitrev.h
 create mode 100644 include/asm-generic/bitops/__bitrev.h
Signature · 1 line
2.51.0