From patchwork Sat Sep 7 14:21:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 2856421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C054BF43F for ; Sat, 7 Sep 2013 14:22:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3185B203EA for ; Sat, 7 Sep 2013 14:22:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E705203E9 for ; Sat, 7 Sep 2013 14:22:00 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VIJOU-0000Ev-KK; Sat, 07 Sep 2013 14:21:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VIJOS-000080-Ej; Sat, 07 Sep 2013 14:21:44 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VIJOP-00007g-4O for linux-arm-kernel@lists.infradead.org; Sat, 07 Sep 2013 14:21:42 +0000 Received: by mail-we0-f174.google.com with SMTP id q58so2814803wes.5 for ; 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=B/AsJKVMYuxvCYnHz+hhzL+wlYvgSdSQPgDbRxdgsPCmvcAN8PqWMGRTzX1xKu3eSS lEXh9/or0beOc6y/wSh7dWfqnr7PhHT5eMpQfJPOTGkxrDGY/oCjygeIri2CmsDnHy4w 79ChAEg5Mk5riuQca/nirFDz3Og4D1YG4xC4clf3lFTezT+KoKJfIUjjlZIDjAOnnKOu ifVRSWhlNl9EGmV6USXPxt1WRFs22WcaJNsUXFxs/SF7Y0bIhgSz1chqYY3rmvKcoQdL N2I48XcdAjV3ORQFYSoDx4NusKQBFr9ChsPr8F74rBA1lagOEqYNajyTQhUod/fTVMZo JtsQ== X-Gm-Message-State: ALoCoQkQ06r+YNX4yGxM1+aFZ3SKQWaV8Hh3z/jkW4t5UTU4CmVvN3HiYD2zBF5zggJ+QnnQtN0p 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 To: linux-arm-kernel@lists.infradead.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130907_102141_309400_ACD8A248 X-CRM114-Status: GOOD ( 12.47 ) X-Spam-Score: -2.6 (--) Cc: Ard Biesheuvel , jwboyer@fedoraproject.org, linux@arm.linux.org.uk, nico@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Ard Biesheuvel Tested-by: Josh Boyer --- 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 +#include + +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);