summaryrefslogtreecommitdiff
path: root/lib/raid/xor/arm64/xor_arch.h
blob: 5dbb40319501b7d957ee4c75612fd16304964b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Authors: Jackie Liu <liuyun01@kylinos.cn>
 * Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.
 */
#include <asm/simd.h>

extern struct xor_block_template xor_block_neon;
extern struct xor_block_template xor_block_eor3;

static __always_inline void __init arch_xor_init(void)
{
	xor_register(&xor_block_8regs);
	xor_register(&xor_block_32regs);
	if (cpu_has_neon()) {
		if (cpu_have_named_feature(SHA3))
			xor_register(&xor_block_eor3);
		else
			xor_register(&xor_block_neon);
	}
}