Move the optimized XOR into lib/raid and include it it in xor.ko instead of unconditionally building it into the main kernel image.
Signed-off-by: Christoph Hellwig <[email protected]> --- arch/s390/lib/Makefile | 2 +- lib/raid/xor/Makefile | 1 + {arch/s390/lib => lib/raid/xor/s390}/xor.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) rename {arch/s390/lib => lib/raid/xor/s390}/xor.c (98%) diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index f43f897d3fc0..2bf47204f6ab 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile @@ -5,7 +5,7 @@ lib-y += delay.o string.o uaccess.o find.o spinlock.o tishift.o lib-y += csum-partial.o -obj-y += mem.o xor.o +obj-y += mem.o lib-$(CONFIG_KPROBES) += probes.o lib-$(CONFIG_UPROBES) += probes.o obj-$(CONFIG_S390_KPROBES_SANITY_TEST) += test_kprobes_s390.o diff --git a/lib/raid/xor/Makefile b/lib/raid/xor/Makefile index eb7617b5c61b..15fd8797ae61 100644 --- a/lib/raid/xor/Makefile +++ b/lib/raid/xor/Makefile @@ -22,6 +22,7 @@ xor-$(CONFIG_RISCV_ISA_V) += riscv/xor.o riscv/xor-glue.o xor-$(CONFIG_SPARC32) += sparc/xor-sparc32.o xor-$(CONFIG_SPARC64) += sparc/xor-vis.o sparc/xor-vis-glue.o xor-$(CONFIG_SPARC64) += sparc/xor-niagara.o sparc/xor-niagara-glue.o +xor-$(CONFIG_S390) += s390/xor.o CFLAGS_arm/xor-neon.o += $(CC_FLAGS_FPU) diff --git a/arch/s390/lib/xor.c b/lib/raid/xor/s390/xor.c similarity index 98% rename from arch/s390/lib/xor.c rename to lib/raid/xor/s390/xor.c index 4d5ed638d850..2d5e33eca2a8 100644 --- a/arch/s390/lib/xor.c +++ b/lib/raid/xor/s390/xor.c @@ -7,7 +7,6 @@ */ #include <linux/types.h> -#include <linux/export.h> #include <linux/raid/xor_impl.h> #include <asm/xor.h> @@ -134,4 +133,3 @@ struct xor_block_template xor_block_xc = { .do_4 = xor_xc_4, .do_5 = xor_xc_5, }; -EXPORT_SYMBOL(xor_block_xc); -- 2.47.3
