linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [v5 1/2] lib/raid6: Build proper files on corresponding arch
@ 2017-04-28  5:58 Matt Brown
  2017-04-28  5:58 ` [v5 2/2] raid6/altivec: Add vpermxor implementation for raid6 Q syndrome Matt Brown
  2017-08-01 22:27 ` [v5 1/2] lib/raid6: Build proper files on corresponding arch Daniel Axtens
  0 siblings, 2 replies; 9+ messages in thread
From: Matt Brown @ 2017-04-28  5:58 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: dja

Previously the raid6 test Makefile did not correctly build the files for
testing on PowerPC. 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>
---
Changelog
v5
	- moved altivec.uc fix into this patch
	- updates commit message
---
 lib/raid6/altivec.uc    | 3 +++
 lib/raid6/test/Makefile | 8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/raid6/altivec.uc b/lib/raid6/altivec.uc
index 682aae8..d20ed0d 100644
--- a/lib/raid6/altivec.uc
+++ b/lib/raid6/altivec.uc
@@ -24,10 +24,13 @@
 
 #include <linux/raid/pq.h>
 
+#ifdef CONFIG_ALTIVEC
+
 #include <altivec.h>
 #ifdef __KERNEL__
 # include <asm/cputable.h>
 # include <asm/switch_to.h>
+#endif /* __KERNEL__ */
 
 /*
  * 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 9c333e9..b64a267 100644
--- a/lib/raid6/test/Makefile
+++ b/lib/raid6/test/Makefile
@@ -44,10 +44,12 @@ else ifeq ($(HAS_NEON),yes)
         CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1
 else
         HAS_ALTIVEC := $(shell printf '\#include <altivec.h>\nvector int a;\n' |\
-                         gcc -c -x c - >&/dev/null && \
-                         rm ./-.o && echo yes)
+                         gcc -c -x c - >/dev/null && rm ./-.o && echo yes)
         ifeq ($(HAS_ALTIVEC),yes)
-                OBJS += altivec1.o altivec2.o altivec4.o altivec8.o
+                CFLAGS += -I../../../arch/powerpc/include
+                CFLAGS += -DCONFIG_ALTIVEC
+                OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \
+                        vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o
         endif
 endif
 ifeq ($(ARCH),tilegx)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-04  1:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28  5:58 [v5 1/2] lib/raid6: Build proper files on corresponding arch Matt Brown
2017-04-28  5:58 ` [v5 2/2] raid6/altivec: Add vpermxor implementation for raid6 Q syndrome Matt Brown
2017-08-01 23:01   ` Daniel Axtens
2017-08-02  2:04     ` Michael Ellerman
2017-08-02  0:20   ` Daniel Axtens
2017-08-04  1:40     ` Matt Brown
2017-08-01 22:27 ` [v5 1/2] lib/raid6: Build proper files on corresponding arch Daniel Axtens
2017-08-02  2:00   ` Michael Ellerman
2017-08-04  1:33     ` Matt Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).