18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Simple interface to link xor_simd.c and xor_simd_glue.c
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Separating these files ensures that no SIMD instructions are run outside of
68c2ecf20Sopenharmony_ci * the kfpu critical section.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef __LOONGARCH_LIB_XOR_SIMD_H
108c2ecf20Sopenharmony_ci#define __LOONGARCH_LIB_XOR_SIMD_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifdef CONFIG_CPU_HAS_LSX
138c2ecf20Sopenharmony_civoid __xor_lsx_2(unsigned long bytes, unsigned long *p1,
148c2ecf20Sopenharmony_ci		 unsigned long *p2);
158c2ecf20Sopenharmony_civoid __xor_lsx_3(unsigned long bytes, unsigned long *p1,
168c2ecf20Sopenharmony_ci		 unsigned long *p2, unsigned long *p3);
178c2ecf20Sopenharmony_civoid __xor_lsx_4(unsigned long bytes, unsigned long *p1,
188c2ecf20Sopenharmony_ci		 unsigned long *p2, unsigned long *p3,
198c2ecf20Sopenharmony_ci		 unsigned long *p4);
208c2ecf20Sopenharmony_civoid __xor_lsx_5(unsigned long bytes, unsigned long *p1,
218c2ecf20Sopenharmony_ci		 unsigned long *p2, unsigned long *p3,
228c2ecf20Sopenharmony_ci		 unsigned long *p4, unsigned long *p5);
238c2ecf20Sopenharmony_ci#endif /* CONFIG_CPU_HAS_LSX */
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#ifdef CONFIG_CPU_HAS_LASX
268c2ecf20Sopenharmony_civoid __xor_lasx_2(unsigned long bytes, unsigned long *p1,
278c2ecf20Sopenharmony_ci		  unsigned long *p2);
288c2ecf20Sopenharmony_civoid __xor_lasx_3(unsigned long bytes, unsigned long *p1,
298c2ecf20Sopenharmony_ci		  unsigned long *p2, unsigned long *p3);
308c2ecf20Sopenharmony_civoid __xor_lasx_4(unsigned long bytes, unsigned long *p1,
318c2ecf20Sopenharmony_ci		  unsigned long *p2, unsigned long *p3,
328c2ecf20Sopenharmony_ci		  unsigned long *p4);
338c2ecf20Sopenharmony_civoid __xor_lasx_5(unsigned long bytes, unsigned long *p1,
348c2ecf20Sopenharmony_ci		  unsigned long *p2, unsigned long *p3,
358c2ecf20Sopenharmony_ci		  unsigned long *p4, unsigned long *p5);
368c2ecf20Sopenharmony_ci#endif /* CONFIG_CPU_HAS_LASX */
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* __LOONGARCH_LIB_XOR_SIMD_H */
39