[PW_SID:1082432] arch/riscv: Add bitrev.h file to support rev8 and brev8#1787
[PW_SID:1082432] arch/riscv: Add bitrev.h file to support rev8 and brev8#1787linux-riscv-bot wants to merge 2 commits into
Conversation
Define generic __bitrev8/16/32 using the implementation in <linux/bitrev.h>, so they can be reused in <asm/bitrev.h>, such as RISCV. Reviewed-by: Yury Norov <ynorov@nvidia.com> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The RISC-V Bit-manipulation Extension for Cryptography (Zbkb) provides the 'brev8' instruction, which reverses the bits within each byte. Combined with the 'rev8' instruction (from Zbb or Zbkb), which reverses the byte order of a register, we can efficiently implement 16-bit, 32-bit, and (on RV64) 64-bit bit reversal. This is significantly faster than the default software table-lookup implementation in lib/bitrev.c, as it replaces memory accesses and multiple arithmetic operations with just two or three hardware instructions. Select HAVE_ARCH_BITREVERSE and provide <asm/bitrev.h> to utilize these instructions when the Zbkb extension is available at runtime via the alternatives mechanism. Link: https://docs.riscv.org/reference/isa/unpriv/b-st-ext.html Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 1: "[v3,1/2] bitops: Define generic __bitrev8/16/32 for reuse" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 2: "[v3,2/2] arch/riscv: Add bitrev.h file to support rev8 and brev8" |
PR for series 1082432 applied to workflow__riscv__fixes
Name: arch/riscv: Add bitrev.h file to support rev8 and brev8
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1082432
Version: 3