1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* Copyright 2025 Google LLC */
3
4#ifndef _RISCV_CRC_CLMUL_H
5#define _RISCV_CRC_CLMUL_H
6
7#include <linux/types.h>
8#include "crc-clmul-consts.h"
9
10u16 crc16_msb_clmul(u16 crc, const void *p, size_t len,
11 const struct crc_clmul_consts *consts);
12u32 crc32_msb_clmul(u32 crc, const void *p, size_t len,
13 const struct crc_clmul_consts *consts);
14u32 crc32_lsb_clmul(u32 crc, const void *p, size_t len,
15 const struct crc_clmul_consts *consts);
16#ifdef CONFIG_64BIT
17u64 crc64_msb_clmul(u64 crc, const void *p, size_t len,
18 const struct crc_clmul_consts *consts);
19u64 crc64_lsb_clmul(u64 crc, const void *p, size_t len,
20 const struct crc_clmul_consts *consts);
21#endif
22
23#endif /* _RISCV_CRC_CLMUL_H */
24

source code of linux/lib/crc/riscv/crc-clmul.h