riscv: Add checksum header
authorCharlie Jenkins <charlie@rivosinc.com>
Mon, 8 Jan 2024 23:57:04 +0000 (15:57 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 18 Jan 2024 01:52:31 +0000 (17:52 -0800)
commite11e367e9fe57164ea609807ed27184c85263355
tree312cbe8e5587361b9be7375b14c77f1079fb8a29
parent2ce5729fce8f62b5118f56110d16006c0e22c522
riscv: Add checksum header

Provide checksum algorithms that have been designed to leverage riscv
instructions such as rotate. In 64-bit, can take advantage of the larger
register to avoid some overflow checking.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Xiao Wang <xiao.w.wang@intel.com>
Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-3-1c50de5f2167@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/checksum.h [new file with mode: 0644]