kernel/fix-arm-neon-xor.patch

103 lines
5.2 KiB
Diff
Raw Normal View History

2013-09-07 15:02:35 +00:00
Delivered-To: jwboyer@gmail.com
Received: by 10.216.166.129 with SMTP id g1csp52986wel;
Sat, 7 Sep 2013 07:21:20 -0700 (PDT)
X-Received: by 10.50.26.36 with SMTP id i4mr2187231igg.33.1378563679768;
Sat, 07 Sep 2013 07:21:19 -0700 (PDT)
Return-Path: <ard.biesheuvel@linaro.org>
Received: from bastion.fedoraproject.org (bastion02.fedoraproject.org. [209.132.181.3])
by mx.google.com with ESMTP id mc6si3756304icc.53.1969.12.31.16.00.00;
Sat, 07 Sep 2013 07:21:19 -0700 (PDT)
Received-SPF: neutral (google.com: 209.132.181.3 is neither permitted nor denied by best guess record for domain of ard.biesheuvel@linaro.org) client-ip=209.132.181.3;
Authentication-Results: mx.google.com;
spf=neutral (google.com: 209.132.181.3 is neither permitted nor denied by best guess record for domain of ard.biesheuvel@linaro.org) smtp.mail=ard.biesheuvel@linaro.org
Received: by bastion02.phx2.fedoraproject.org (Postfix)
id EE3EB40737; Sat, 7 Sep 2013 14:21:18 +0000 (UTC)
Delivered-To: jwboyer@fedoraproject.org
Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21])
by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id D80244052F
for <jwboyer@fedoraproject.org>; Sat, 7 Sep 2013 14:21:18 +0000 (UTC)
Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r87ELGCQ021393
for <jwboyer@fedoraproject.org>; Sat, 7 Sep 2013 10:21:17 -0400
Received: by mail-wi0-f175.google.com with SMTP id ez12so1920603wid.14
for <jwboyer@fedoraproject.org>; Sat, 07 Sep 2013 07:21:16 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:from:to:cc:subject:date:message-id;
bh=8NEw4B1Nab9xiONGFPVLOs/nT1KunUfaacstB7/m/No=;
b=DB/Eo8aD3MRNKvlw+eoioLLb0CGNH/AiibPqiInWEpiU7eNwGiVjkPnJVaqT2DiH0Z
bkL4pFXThRYvpeeJ1Qind76YdsYxX1wcqqYqASAk6m/a+623LbEnilGsC85+8sW10fbk
xeFhNZCAGQ4uROVe034V2mfoXadXiHGfB5FPzI49QJ9tzHDDWlW/q+YHVvYjtxYfJxjm
Joeciq+LG04AvYeZ3+I0XOHoSuaD8BNthivxr9IFPyUqxfA7OK8B4DG0YptbXzErpntI
1zEY5YFmR6fATLo/6RItgWle0OGD+zhqYJYPw3S56z/1JN4aJWnPII53w1sIezgFzcMv
WWLQ==
X-Gm-Message-State: ALoCoQmWJcKQMJ6xt5DORrctGdw5Yt5RzFKGNaHdcTwAevLxBc5Js9+qvziWRVYvjeGY2VutWSrU
X-Received: by 10.180.211.206 with SMTP id ne14mr2342383wic.30.1378563676626;
Sat, 07 Sep 2013 07:21:16 -0700 (PDT)
Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71])
by mx.google.com with ESMTPSA id ey2sm3980324wib.5.1969.12.31.16.00.00
(version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Sat, 07 Sep 2013 07:21:16 -0700 (PDT)
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Cc: linux@arm.linux.org.uk, nico@linaro.org, jwboyer@fedoraproject.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH] ARM: fix modular build of xor_blocks() with NEON enabled
Date: Sat, 7 Sep 2013 16:21:13 +0200
Message-Id: <1378563673-10637-1-git-send-email-ard.biesheuvel@linaro.org>
X-Mailer: git-send-email 1.8.1.2
X-RedHat-Spam-Score: -2.999 (BAYES_00,DCC_REPUT_00_12,RCVD_IN_DNSWL_LOW,URIBL_BLOCKED)
X-Scanned-By: MIMEDefang 2.68 on 10.5.110.21
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>
---
arch/arm/lib/Makefile | 4 +++-
arch/arm/lib/xor-neon.c | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index aaf3a87..6bc2bd3 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -49,5 +49,7 @@ $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon
CFLAGS_xor-neon.o += $(NEON_FLAGS)
- lib-$(CONFIG_XOR_BLOCKS) += xor-neon.o
+ xor-neon-$(CONFIG_XOR_BLOCKS) := xor-neon.o
+ lib-y += $(xor-neon-y)
+ obj-m += $(xor-neon-m)
endif
diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
index f485e5a..2c40aea 100644
--- a/arch/arm/lib/xor-neon.c
+++ b/arch/arm/lib/xor-neon.c
@@ -9,6 +9,9 @@
*/
#include <linux/raid/xor.h>
+#include <linux/module.h>
+
+MODULE_LICENSE("GPL");
#ifndef __ARM_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 = {
.do_4 = xor_8regs_4,
.do_5 = xor_8regs_5,
};
+EXPORT_SYMBOL(xor_block_neon_inner);
--
1.8.1.2