From patchwork Wed Feb 10 21:56:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 8274961 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFC2BBEEE5 for ; Wed, 10 Feb 2016 22:11:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6D832037E for ; Wed, 10 Feb 2016 22:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C7CF201EF for ; Wed, 10 Feb 2016 22:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbcBJWLR (ORCPT ); Wed, 10 Feb 2016 17:11:17 -0500 Received: from relais.videotron.ca ([24.201.245.36]:37463 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751621AbcBJWLQ (ORCPT ); Wed, 10 Feb 2016 17:11:16 -0500 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Feb 2016 17:11:16 EST MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from yoda.home ([96.23.157.65]) by VL-VM-MR007.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0O2C00K29Q9KBWD1@VL-VM-MR007.ip.videotron.ca>; Wed, 10 Feb 2016 16:56:08 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 6F79D2DA0465; Wed, 10 Feb 2016 16:56:07 -0500 (EST) Date: Wed, 10 Feb 2016 16:56:07 -0500 (EST) From: Nicolas Pitre To: Al Viro Cc: linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 07/13] arm: move exports to definitions In-reply-to: <1454534445-16759-7-git-send-email-viro@ZenIV.linux.org.uk> Message-id: References: <20160203211953.GT17997@ZenIV.linux.org.uk> <1454534445-16759-7-git-send-email-viro@ZenIV.linux.org.uk> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 On Wed, 3 Feb 2016, Al Viro wrote: > From: Al Viro > > Signed-off-by: Al Viro The following construct is incompatible with my autoksyms series: > diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h > index 7d807cf..df06638 100644 > --- a/arch/arm/lib/bitops.h > +++ b/arch/arm/lib/bitops.h > @@ -1,5 +1,6 @@ > #include > #include > +#include > > #if __LINUX_ARM_ARCH__ >= 6 > .macro bitop, name, instr > @@ -25,6 +26,7 @@ UNWIND( .fnstart ) > bx lr > UNWIND( .fnend ) > ENDPROC(\name ) > +EXPORT_SYMBOL(\name ) > .endm Here \name is an assembler macro argument and it is not subject to preprocessor substitutions. And the assembler doesn't see preprocessor macros either. So I'd suggest folding the following patch to let the preprocessor see the actual symbol name. It doesn't make the source code as compact but it works with my series. --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index df06638b32..7d807cfd8e 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h @@ -1,6 +1,5 @@ #include #include -#include #if __LINUX_ARM_ARCH__ >= 6 .macro bitop, name, instr @@ -26,7 +25,6 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm .macro testop, name, instr, store @@ -57,7 +55,6 @@ UNWIND( .fnstart ) 2: bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm #else .macro bitop, name, instr @@ -77,7 +74,6 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm /** @@ -106,6 +102,5 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm #endif diff --git a/arch/arm/lib/changebit.S b/arch/arm/lib/changebit.S index f402786217..1cfdb138d2 100644 --- a/arch/arm/lib/changebit.S +++ b/arch/arm/lib/changebit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text bitop _change_bit, eor + +EXPORT_SYMBOL(_change_bit) diff --git a/arch/arm/lib/clearbit.S b/arch/arm/lib/clearbit.S index f6b75fb64d..e901ca5af0 100644 --- a/arch/arm/lib/clearbit.S +++ b/arch/arm/lib/clearbit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text bitop _clear_bit, bic + +EXPORT_SYMBOL(_clear_bit) diff --git a/arch/arm/lib/setbit.S b/arch/arm/lib/setbit.S index 618fedae4b..3c8b11240f 100644 --- a/arch/arm/lib/setbit.S +++ b/arch/arm/lib/setbit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text bitop _set_bit, orr + +EXPORT_SYMBOL(_set_bit) diff --git a/arch/arm/lib/testchangebit.S b/arch/arm/lib/testchangebit.S index 4becdc3a59..e3d19b87fb 100644 --- a/arch/arm/lib/testchangebit.S +++ b/arch/arm/lib/testchangebit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text testop _test_and_change_bit, eor, str + +EXPORT_SYMBOL(_test_and_change_bit) diff --git a/arch/arm/lib/testclearbit.S b/arch/arm/lib/testclearbit.S index 918841dcce..d247e6f70f 100644 --- a/arch/arm/lib/testclearbit.S +++ b/arch/arm/lib/testclearbit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text testop _test_and_clear_bit, bicne, strne + +EXPORT_SYMBOL(_test_and_clear_bit) diff --git a/arch/arm/lib/testsetbit.S b/arch/arm/lib/testsetbit.S index 8d1b2fe9e4..76800ff601 100644 --- a/arch/arm/lib/testsetbit.S +++ b/arch/arm/lib/testsetbit.S @@ -9,7 +9,10 @@ */ #include #include +#include #include "bitops.h" .text testop _test_and_set_bit, orreq, streq + +EXPORT_SYMBOL(_test_and_set_bit)