xref: /linux/arch/riscv/lib/crc-clmul.h (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
172acff5fSEric Biggers /* SPDX-License-Identifier: GPL-2.0-or-later */
272acff5fSEric Biggers /* Copyright 2025 Google LLC */
372acff5fSEric Biggers 
472acff5fSEric Biggers #ifndef _RISCV_CRC_CLMUL_H
572acff5fSEric Biggers #define _RISCV_CRC_CLMUL_H
672acff5fSEric Biggers 
772acff5fSEric Biggers #include <linux/types.h>
872acff5fSEric Biggers #include "crc-clmul-consts.h"
972acff5fSEric Biggers 
108bf3e178SEric Biggers u16 crc16_msb_clmul(u16 crc, const void *p, size_t len,
118bf3e178SEric Biggers 		    const struct crc_clmul_consts *consts);
1272acff5fSEric Biggers u32 crc32_msb_clmul(u32 crc, const void *p, size_t len,
1372acff5fSEric Biggers 		    const struct crc_clmul_consts *consts);
1472acff5fSEric Biggers u32 crc32_lsb_clmul(u32 crc, const void *p, size_t len,
1572acff5fSEric Biggers 		    const struct crc_clmul_consts *consts);
16*511484faSEric Biggers #ifdef CONFIG_64BIT
17*511484faSEric Biggers u64 crc64_msb_clmul(u64 crc, const void *p, size_t len,
18*511484faSEric Biggers 		    const struct crc_clmul_consts *consts);
19*511484faSEric Biggers u64 crc64_lsb_clmul(u64 crc, const void *p, size_t len,
20*511484faSEric Biggers 		    const struct crc_clmul_consts *consts);
21*511484faSEric Biggers #endif
2272acff5fSEric Biggers 
2372acff5fSEric Biggers #endif /* _RISCV_CRC_CLMUL_H */
24