Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Matt Brown and committed by
Michael Ellerman
aa9532d4 751ba79c

+6 -2
+3
lib/raid6/altivec.uc
··· 24 24 25 25 #include <linux/raid/pq.h> 26 26 27 + #ifdef CONFIG_ALTIVEC 28 + 27 29 #include <altivec.h> 28 30 #ifdef __KERNEL__ 29 31 # include <asm/cputable.h> 30 32 # include <asm/switch_to.h> 33 + #endif /* __KERNEL__ */ 31 34 32 35 /* 33 36 * This is the C data type to use. We use a vector of
+3 -2
lib/raid6/test/Makefile
··· 45 45 CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 46 46 else 47 47 HAS_ALTIVEC := $(shell printf '\#include <altivec.h>\nvector int a;\n' |\ 48 - gcc -c -x c - >&/dev/null && \ 49 - rm ./-.o && echo yes) 48 + gcc -c -x c - >/dev/null && rm ./-.o && echo yes) 50 49 ifeq ($(HAS_ALTIVEC),yes) 50 + CFLAGS += -I../../../arch/powerpc/include 51 + CFLAGS += -DCONFIG_ALTIVEC 51 52 OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \ 52 53 vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o 53 54 endif