Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f8c55c5 authored by Yuanhan Liu's avatar Yuanhan Liu Committed by NeilBrown
Browse files

lib/raid6: build proper files on corresponding arch



sse and avx2 stuff only exist on x86 arch, and we don't need to build
altivec on x86. And we can do that at lib/raid6/Makefile.

Proposed-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarJim Kukunas <james.t.kukunas@linux.intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 2c935842
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
obj-$(CONFIG_RAID6_PQ)	+= raid6_pq.o

raid6_pq-y	+= algos.o recov.o recov_ssse3.o recov_avx2.o tables.o int1.o int2.o int4.o \
		   int8.o int16.o int32.o altivec1.o altivec2.o altivec4.o \
		   altivec8.o mmx.o sse1.o sse2.o avx2.o
raid6_pq-y	+= algos.o recov.o tables.o int1.o int2.o int4.o \
		   int8.o int16.o int32.o

raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o
raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o

hostprogs-y	+= mktables

quiet_cmd_unroll = UNROLL  $@
+0 −3
Original line number Diff line number Diff line
@@ -24,13 +24,10 @@

#include <linux/raid/pq.h>

#ifdef CONFIG_ALTIVEC

#include <altivec.h>
#ifdef __KERNEL__
# include <asm/cputable.h>
# include <asm/switch_to.h>
#endif

/*
 * This is the C data type to use.  We use a vector of
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
 * MMX implementation of RAID-6 syndrome functions
 */

#if defined(__i386__) && !defined(__arch_um__)
#ifdef CONFIG_X86_32

#include <linux/raid/pq.h>
#include "x86.h"
+0 −4
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
 * of the License.
 */

#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)

#if CONFIG_AS_AVX2

#include <linux/raid/pq.h>
@@ -323,5 +321,3 @@ const struct raid6_recov_calls raid6_recov_avx2 = {
#else
#warning "your version of binutils lacks AVX2 support"
#endif

#endif
+0 −4
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@
 * of the License.
 */

#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)

#include <linux/raid/pq.h>
#include "x86.h"

@@ -332,5 +330,3 @@ const struct raid6_recov_calls raid6_recov_ssse3 = {
#endif
	.priority = 1,
};

#endif
Loading