summaryrefslogtreecommitdiffstats
path: root/lib/raid6
diff options
context:
space:
mode:
authorMatt Brown <matthew.brown.dev@gmail.com>2017-08-03 23:42:33 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-20 01:47:52 -0400
commitaa9532d4899ff14e50de10d261b761d157cd2ae3 (patch)
tree373ef653ad6ea18f7aae0ca9973a5ad17a7b53da /lib/raid6
parent751ba79cc552c146595cd439b21c4ff8998c3b69 (diff)
lib/raid6: Build proper raid6test files on powerpc
Previously the raid6 test Makefile did not build the POWER specific files (altivec and vpermxor). This patch fixes the bug, so that all appropriate files for powerpc are built. This patch also fixes the missing and mismatched ifdef statements to allow the altivec.uc file to be built correctly. Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'lib/raid6')
-rw-r--r--lib/raid6/altivec.uc3
-rw-r--r--lib/raid6/test/Makefile5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/raid6/altivec.uc b/lib/raid6/altivec.uc
index 682aae8a1fef..d20ed0d11411 100644
--- a/lib/raid6/altivec.uc
+++ b/lib/raid6/altivec.uc
@@ -24,10 +24,13 @@
24 24
25#include <linux/raid/pq.h> 25#include <linux/raid/pq.h>
26 26
27#ifdef CONFIG_ALTIVEC
28
27#include <altivec.h> 29#include <altivec.h>
28#ifdef __KERNEL__ 30#ifdef __KERNEL__
29# include <asm/cputable.h> 31# include <asm/cputable.h>
30# include <asm/switch_to.h> 32# include <asm/switch_to.h>
33#endif /* __KERNEL__ */
31 34
32/* 35/*
33 * This is the C data type to use. We use a vector of 36 * This is the C data type to use. We use a vector of
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile
index ef6d0e00f189..5050e270c06b 100644
--- a/lib/raid6/test/Makefile
+++ b/lib/raid6/test/Makefile
@@ -45,9 +45,10 @@ else ifeq ($(HAS_NEON),yes)
45 CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 45 CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1
46else 46else
47 HAS_ALTIVEC := $(shell printf '\#include <altivec.h>\nvector int a;\n' |\ 47 HAS_ALTIVEC := $(shell printf '\#include <altivec.h>\nvector int a;\n' |\
48 gcc -c -x c - >&/dev/null && \ 48 gcc -c -x c - >/dev/null && rm ./-.o && echo yes)
49 rm ./-.o && echo yes)
50 ifeq ($(HAS_ALTIVEC),yes) 49 ifeq ($(HAS_ALTIVEC),yes)
50 CFLAGS += -I../../../arch/powerpc/include
51 CFLAGS += -DCONFIG_ALTIVEC
51 OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \ 52 OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \
52 vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o 53 vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o
53 endif 54 endif