Add patch to fix ARM kernel neon build

This commit is contained in:
Josh Boyer 2013-09-07 11:02:35 -04:00
parent 38ae254a00
commit 21c795cc26
3 changed files with 109 additions and 2 deletions

View File

@ -14,7 +14,7 @@ CONFIG_AEABI=y
CONFIG_VFP=y
CONFIG_VFPv3=y
CONFIG_NEON=y
# CONFIG_KERNEL_MODE_NEON is not set
CONFIG_KERNEL_MODE_NEON=y
CONFIG_ARM_UNWIND=y
CONFIG_ARM_THUMB=y

102
fix-arm-neon-xor.patch Normal file
View File

@ -0,0 +1,102 @@
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

View File

@ -62,7 +62,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 1
%global baserelease 2
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -770,6 +770,7 @@ Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch
Patch25099: HID-CVE-fixes.patch
Patch25100: perf-arm-fix.patch
Patch25101: fix-arm-neon-xor.patch
# END OF PATCH DEFINITIONS
@ -1499,6 +1500,7 @@ ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch
ApplyPatch HID-CVE-fixes.patch
ApplyPatch perf-arm-fix.patch
ApplyPatch fix-arm-neon-xor.patch
# END OF PATCH APPLICATIONS
@ -2301,6 +2303,9 @@ fi
# ||----w |
# || ||
%changelog
* Sat Sep 07 2013 Josh Boyer <jwboyer@fedoraproject.org>
- Add patch to fix ARM kernel neon build
* Fri Sep 06 2013 Josh Boyer <jwboyer@fedoraproject.org> - 3.12.0-0.rc0.git14.1
- Linux v3.11-6855-g4de9ad9