[PW_SID:1064839] arch/riscv: Add bitrev.h file to support rev8 and brev8#1591
[PW_SID:1064839] arch/riscv: Add bitrev.h file to support rev8 and brev8#1591linux-riscv-bot wants to merge 1 commit into
Conversation
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. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
|
Patch 1: "arch/riscv: Add bitrev.h file to support rev8 and brev8" |
PR for series 1064839 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=1064839
Version: 1