Commit 9319206d authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Russell King

ARM: 7835/2: fix modular build of xor_blocks() with NEON enabled

Commit 01956597 introduced a NEON accelerated version of the xor_blocks()
function, but it needs the changes in this patch to allow it to be built
as a module rather than statically into the kernel.

This patch creates a separate module xor-neon.ko which exports the NEON
inner xor_blocks() functions depended upon by the regular xor.ko if it
is built with CONFIG_KERNEL_MODE_NEON=y
Reported-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e5c832d5
...@@ -49,5 +49,5 @@ $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S ...@@ -49,5 +49,5 @@ $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
ifeq ($(CONFIG_KERNEL_MODE_NEON),y) ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon
CFLAGS_xor-neon.o += $(NEON_FLAGS) CFLAGS_xor-neon.o += $(NEON_FLAGS)
lib-$(CONFIG_XOR_BLOCKS) += xor-neon.o obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o
endif endif
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
*/ */
#include <linux/raid/xor.h> #include <linux/raid/xor.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
#ifndef __ARM_NEON__ #ifndef __ARM_NEON__
#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon' #error You should compile this file with '-mfloat-abi=softfp -mfpu=neon'
...@@ -40,3 +43,4 @@ struct xor_block_template const xor_block_neon_inner = { ...@@ -40,3 +43,4 @@ struct xor_block_template const xor_block_neon_inner = {
.do_4 = xor_8regs_4, .do_4 = xor_8regs_4,
.do_5 = xor_8regs_5, .do_5 = xor_8regs_5,
}; };
EXPORT_SYMBOL(xor_block_neon_inner);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment