1*033bee3eSChristoph Hellwig /* SPDX-License-Identifier: GPL-2.0-or-later */ 2*033bee3eSChristoph Hellwig /* 3*033bee3eSChristoph Hellwig * Simple interface to link xor_simd.c and xor_simd_glue.c 4*033bee3eSChristoph Hellwig * 5*033bee3eSChristoph Hellwig * Separating these files ensures that no SIMD instructions are run outside of 6*033bee3eSChristoph Hellwig * the kfpu critical section. 7*033bee3eSChristoph Hellwig */ 8*033bee3eSChristoph Hellwig 9*033bee3eSChristoph Hellwig #ifndef __LOONGARCH_LIB_XOR_SIMD_H 10*033bee3eSChristoph Hellwig #define __LOONGARCH_LIB_XOR_SIMD_H 11*033bee3eSChristoph Hellwig 12*033bee3eSChristoph Hellwig #ifdef CONFIG_CPU_HAS_LSX 13*033bee3eSChristoph Hellwig void __xor_lsx_2(unsigned long bytes, unsigned long * __restrict p1, 14*033bee3eSChristoph Hellwig const unsigned long * __restrict p2); 15*033bee3eSChristoph Hellwig void __xor_lsx_3(unsigned long bytes, unsigned long * __restrict p1, 16*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3); 17*033bee3eSChristoph Hellwig void __xor_lsx_4(unsigned long bytes, unsigned long * __restrict p1, 18*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3, 19*033bee3eSChristoph Hellwig const unsigned long * __restrict p4); 20*033bee3eSChristoph Hellwig void __xor_lsx_5(unsigned long bytes, unsigned long * __restrict p1, 21*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3, 22*033bee3eSChristoph Hellwig const unsigned long * __restrict p4, const unsigned long * __restrict p5); 23*033bee3eSChristoph Hellwig #endif /* CONFIG_CPU_HAS_LSX */ 24*033bee3eSChristoph Hellwig 25*033bee3eSChristoph Hellwig #ifdef CONFIG_CPU_HAS_LASX 26*033bee3eSChristoph Hellwig void __xor_lasx_2(unsigned long bytes, unsigned long * __restrict p1, 27*033bee3eSChristoph Hellwig const unsigned long * __restrict p2); 28*033bee3eSChristoph Hellwig void __xor_lasx_3(unsigned long bytes, unsigned long * __restrict p1, 29*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3); 30*033bee3eSChristoph Hellwig void __xor_lasx_4(unsigned long bytes, unsigned long * __restrict p1, 31*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3, 32*033bee3eSChristoph Hellwig const unsigned long * __restrict p4); 33*033bee3eSChristoph Hellwig void __xor_lasx_5(unsigned long bytes, unsigned long * __restrict p1, 34*033bee3eSChristoph Hellwig const unsigned long * __restrict p2, const unsigned long * __restrict p3, 35*033bee3eSChristoph Hellwig const unsigned long * __restrict p4, const unsigned long * __restrict p5); 36*033bee3eSChristoph Hellwig #endif /* CONFIG_CPU_HAS_LASX */ 37*033bee3eSChristoph Hellwig 38*033bee3eSChristoph Hellwig #endif /* __LOONGARCH_LIB_XOR_SIMD_H */ 39