xref: /linux/lib/raid/xor/riscv/xor_arch.h (revision 440d6635b20037bc9ad46b20817d7b61cef0fc1b)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2021 SiFive
4  */
5 #include <asm/vector.h>
6 
7 extern struct xor_block_template xor_block_rvv;
8 
9 static __always_inline void __init arch_xor_init(void)
10 {
11 	xor_register(&xor_block_8regs);
12 	xor_register(&xor_block_32regs);
13 #ifdef CONFIG_RISCV_ISA_V
14 	if (has_vector())
15 		xor_register(&xor_block_rvv);
16 #endif
17 }
18