Skip to content

Commit aa9532d

Browse files
m-browmpe
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 751ba79 commit aa9532d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/raid6/altivec.uc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424

2525
#include <linux/raid/pq.h>
2626

27+
#ifdef CONFIG_ALTIVEC
28+
2729
#include <altivec.h>
2830
#ifdef __KERNEL__
2931
# include <asm/cputable.h>
3032
# include <asm/switch_to.h>
33+
#endif /* __KERNEL__ */
3134

3235
/*
3336
* This is the C data type to use. We use a vector of

lib/raid6/test/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ else ifeq ($(HAS_NEON),yes)
4545
CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1
4646
else
4747
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)
5049
ifeq ($(HAS_ALTIVEC),yes)
50+
CFLAGS += -I../../../arch/powerpc/include
51+
CFLAGS += -DCONFIG_ALTIVEC
5152
OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \
5253
vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o
5354
endif

0 commit comments

Comments
 (0)