xref: /linux/lib/raid/xor/arm64/xor-neon-glue.c (revision 440d6635b20037bc9ad46b20817d7b61cef0fc1b)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Authors: Jackie Liu <liuyun01@kylinos.cn>
4  * Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.
5  */
6 
7 #include <asm/simd.h>
8 #include "xor_impl.h"
9 #include "xor_arch.h"
10 #include "xor-neon.h"
11 
12 #define XOR_TEMPLATE(_name)						\
13 static void xor_gen_##_name(void *dest, void **srcs, unsigned int src_cnt, \
14 		unsigned int bytes)					\
15 {									\
16 	scoped_ksimd()							\
17 		xor_gen_##_name##_inner(dest, srcs, src_cnt, bytes);	\
18 }									\
19 									\
20 struct xor_block_template xor_block_##_name = {				\
21 	.name   	= __stringify(_name),				\
22 	.xor_gen	= xor_gen_##_name,				\
23 };
24 
25 XOR_TEMPLATE(neon);
26 XOR_TEMPLATE(eor3);
27