diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2013-09-09 10:08:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-09-09 10:24:47 -0400 |
commit | 9319206d712a5462b93870c38144a7c9a452d392 (patch) | |
tree | 649ad8e2fbed094eac854b3a29965add42730de3 /arch/arm | |
parent | e5c832d5558826cc6e9a24746cfdec8e7780063a (diff) |
ARM: 7835/2: fix modular build of xor_blocks() with NEON enabled
Commit 0195659 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: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/lib/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/lib/xor-neon.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index aaf3a8731136..bd454b09133e 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -49,5 +49,5 @@ $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S | |||
49 | ifeq ($(CONFIG_KERNEL_MODE_NEON),y) | 49 | ifeq ($(CONFIG_KERNEL_MODE_NEON),y) |
50 | NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon | 50 | NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon |
51 | CFLAGS_xor-neon.o += $(NEON_FLAGS) | 51 | CFLAGS_xor-neon.o += $(NEON_FLAGS) |
52 | lib-$(CONFIG_XOR_BLOCKS) += xor-neon.o | 52 | obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o |
53 | endif | 53 | endif |
diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c index f485e5a2af4b..2c40aeab3eaa 100644 --- a/arch/arm/lib/xor-neon.c +++ b/arch/arm/lib/xor-neon.c | |||
@@ -9,6 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/raid/xor.h> | 11 | #include <linux/raid/xor.h> |
12 | #include <linux/module.h> | ||
13 | |||
14 | MODULE_LICENSE("GPL"); | ||
12 | 15 | ||
13 | #ifndef __ARM_NEON__ | 16 | #ifndef __ARM_NEON__ |
14 | #error You should compile this file with '-mfloat-abi=softfp -mfpu=neon' | 17 | #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 | .do_4 = xor_8regs_4, | 43 | .do_4 = xor_8regs_4, |
41 | .do_5 = xor_8regs_5, | 44 | .do_5 = xor_8regs_5, |
42 | }; | 45 | }; |
46 | EXPORT_SYMBOL(xor_block_neon_inner); | ||