1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Altivec XOR operations
5 * Copyright 2017 IBM Corp.
8 #include <linux/preempt.h>
9 #include <linux/export.h>
10 #include <linux/sched.h>
11 #include <asm/switch_to.h>
12 #include <asm/xor_altivec.h>
15 void xor_altivec_2(unsigned long bytes
, unsigned long *v1_in
,
19 enable_kernel_altivec();
20 __xor_altivec_2(bytes
, v1_in
, v2_in
);
21 disable_kernel_altivec();
24 EXPORT_SYMBOL(xor_altivec_2
);
26 void xor_altivec_3(unsigned long bytes
, unsigned long *v1_in
,
27 unsigned long *v2_in
, unsigned long *v3_in
)
30 enable_kernel_altivec();
31 __xor_altivec_3(bytes
, v1_in
, v2_in
, v3_in
);
32 disable_kernel_altivec();
35 EXPORT_SYMBOL(xor_altivec_3
);
37 void xor_altivec_4(unsigned long bytes
, unsigned long *v1_in
,
38 unsigned long *v2_in
, unsigned long *v3_in
,
42 enable_kernel_altivec();
43 __xor_altivec_4(bytes
, v1_in
, v2_in
, v3_in
, v4_in
);
44 disable_kernel_altivec();
47 EXPORT_SYMBOL(xor_altivec_4
);
49 void xor_altivec_5(unsigned long bytes
, unsigned long *v1_in
,
50 unsigned long *v2_in
, unsigned long *v3_in
,
51 unsigned long *v4_in
, unsigned long *v5_in
)
54 enable_kernel_altivec();
55 __xor_altivec_5(bytes
, v1_in
, v2_in
, v3_in
, v4_in
, v5_in
);
56 disable_kernel_altivec();
59 EXPORT_SYMBOL(xor_altivec_5
);