0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/preempt.h>
0009 #include <linux/export.h>
0010 #include <linux/sched.h>
0011 #include <asm/switch_to.h>
0012 #include <asm/xor_altivec.h>
0013 #include "xor_vmx.h"
0014
0015 void xor_altivec_2(unsigned long bytes, unsigned long * __restrict p1,
0016 const unsigned long * __restrict p2)
0017 {
0018 preempt_disable();
0019 enable_kernel_altivec();
0020 __xor_altivec_2(bytes, p1, p2);
0021 disable_kernel_altivec();
0022 preempt_enable();
0023 }
0024 EXPORT_SYMBOL(xor_altivec_2);
0025
0026 void xor_altivec_3(unsigned long bytes, unsigned long * __restrict p1,
0027 const unsigned long * __restrict p2,
0028 const unsigned long * __restrict p3)
0029 {
0030 preempt_disable();
0031 enable_kernel_altivec();
0032 __xor_altivec_3(bytes, p1, p2, p3);
0033 disable_kernel_altivec();
0034 preempt_enable();
0035 }
0036 EXPORT_SYMBOL(xor_altivec_3);
0037
0038 void xor_altivec_4(unsigned long bytes, unsigned long * __restrict p1,
0039 const unsigned long * __restrict p2,
0040 const unsigned long * __restrict p3,
0041 const unsigned long * __restrict p4)
0042 {
0043 preempt_disable();
0044 enable_kernel_altivec();
0045 __xor_altivec_4(bytes, p1, p2, p3, p4);
0046 disable_kernel_altivec();
0047 preempt_enable();
0048 }
0049 EXPORT_SYMBOL(xor_altivec_4);
0050
0051 void xor_altivec_5(unsigned long bytes, unsigned long * __restrict p1,
0052 const unsigned long * __restrict p2,
0053 const unsigned long * __restrict p3,
0054 const unsigned long * __restrict p4,
0055 const unsigned long * __restrict p5)
0056 {
0057 preempt_disable();
0058 enable_kernel_altivec();
0059 __xor_altivec_5(bytes, p1, p2, p3, p4, p5);
0060 disable_kernel_altivec();
0061 preempt_enable();
0062 }
0063 EXPORT_SYMBOL(xor_altivec_5);