xref: /linux/arch/riscv/lib/crc64_msb.c (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
1*511484faSEric Biggers // SPDX-License-Identifier: GPL-2.0-or-later
2*511484faSEric Biggers /*
3*511484faSEric Biggers  * RISC-V optimized most-significant-bit-first CRC64
4*511484faSEric Biggers  *
5*511484faSEric Biggers  * Copyright 2025 Google LLC
6*511484faSEric Biggers  */
7*511484faSEric Biggers 
8*511484faSEric Biggers #include "crc-clmul.h"
9*511484faSEric Biggers 
10*511484faSEric Biggers typedef u64 crc_t;
11*511484faSEric Biggers #define LSB_CRC 0
12*511484faSEric Biggers #include "crc-clmul-template.h"
13*511484faSEric Biggers 
14*511484faSEric Biggers u64 crc64_msb_clmul(u64 crc, const void *p, size_t len,
15*511484faSEric Biggers 		    const struct crc_clmul_consts *consts)
16*511484faSEric Biggers {
17*511484faSEric Biggers 	return crc_clmul(crc, p, len, consts);
18*511484faSEric Biggers }
19