All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Al Viro <viro@ZenIV.linux.org.uk>
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
Date: Wed, 10 Feb 2016 16:56:07 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.20.1602101636250.17825@knanqh.ubzr> (raw)
In-Reply-To: <1454534445-16759-7-git-send-email-viro@ZenIV.linux.org.uk>

On Wed, 3 Feb 2016, Al Viro wrote:

> From: Al Viro <viro@zeniv.linux.org.uk>
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

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 <asm/assembler.h>
>  #include <asm/unwind.h>
> +#include <asm/export.h>
>  
>  #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.

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 <asm/assembler.h>
 #include <asm/unwind.h>
-#include <asm/export.h>
 
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #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 <linux/linkage.h>
 #include <asm/assembler.h>
+#include <asm/export.h>
 #include "bitops.h"
                 .text
 
 testop	_test_and_set_bit, orreq, streq
+
+EXPORT_SYMBOL(_test_and_set_bit)

  reply	other threads:[~2016-02-10 22:11 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 19:17 [RFC][PATCHSET] allowing exports in *.S Al Viro
2016-01-29 19:18 ` [PATCH 01/12] [kbuild] handle exports in lib-y objects reliably Al Viro
2016-01-29 19:18 ` [PATCH 02/12] EXPORT_SYMBOL() for asm Al Viro
2016-01-29 21:06   ` Arnd Bergmann
2016-01-29 19:18 ` [PATCH 03/12] x86: move exports to actual definitions Al Viro
2016-02-01  8:12   ` Thomas Gleixner
2016-01-29 19:18 ` [PATCH 04/12] alpha: " Al Viro
2016-01-29 19:18 ` [PATCH 05/12] m68k: move exports to definitions Al Viro
2016-02-01 10:52   ` Geert Uytterhoeven
2016-02-01 12:18     ` Al Viro
2016-02-01 13:30       ` Geert Uytterhoeven
2016-02-01 14:53         ` Al Viro
2016-02-01 15:32           ` Geert Uytterhoeven
2016-01-29 19:18 ` [PATCH 06/12] s390: " Al Viro
2016-02-02 11:29   ` Heiko Carstens
2016-01-29 19:18 ` [PATCH 07/12] arm: " Al Viro
2016-01-29 19:18 ` [PATCH 08/12] ppc: " Al Viro
2016-01-29 19:18 ` [PATCH 09/12] sparc: " Al Viro
2016-01-30  7:08   ` David Miller
2016-01-29 19:18 ` [PATCH 10/12] ia64: " Al Viro
2016-01-29 19:18 ` [PATCH 11/12] [sparc] unify 32bit and 64bit string.h Al Viro
2016-01-30  7:08   ` David Miller
2016-01-29 19:18 ` [PATCH 12/12] sparc32: debride memcpy.S a bit Al Viro
2016-01-30  7:07   ` David Miller
2016-02-01 15:12 ` [PATCH 02/12] EXPORT_SYMBOL() for asm David Howells
2016-02-03 21:19 ` [RFC][PATCHSET v2] allowing exports in *.S Al Viro
2016-02-03 21:20   ` [PATCH v2 01/13] [kbuild] handle exports in lib-y objects reliably Al Viro
2016-02-04 22:33     ` Michal Marek
2016-02-05  0:18       ` Al Viro
2016-02-03 21:20   ` [PATCH v2 02/13] EXPORT_SYMBOL() for asm Al Viro
2016-02-04 18:06     ` Al Viro
2016-02-10 22:15     ` Nicolas Pitre
2016-02-03 21:20   ` [PATCH v2 03/13] x86: move exports to actual definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 04/13] alpha: " Al Viro
2016-02-03 21:20   ` [PATCH v2 05/13] m68k: move exports to definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 06/13] s390: " Al Viro
2016-02-03 21:20   ` [PATCH v2 07/13] arm: " Al Viro
2016-02-10 21:56     ` Nicolas Pitre [this message]
2016-02-03 21:20   ` [PATCH v2 08/13] ppc: " Al Viro
2016-02-03 21:20   ` [PATCH v2 09/13] ppc: get rid of unreachable abs() implementation Al Viro
2016-02-03 21:20   ` [PATCH v2 10/13] sparc: move exports to definitions Al Viro
2016-02-03 21:20   ` [PATCH v2 11/13] [sparc] unify 32bit and 64bit string.h Al Viro
2016-02-03 21:20   ` [PATCH v2 12/13] sparc32: debride memcpy.S a bit Al Viro
2016-02-03 21:20   ` [PATCH v2 13/13] ia64: move exports to definitions Al Viro
2016-08-02 14:01   ` [RFC][PATCHSET v2] allowing exports in *.S Michal Marek
2016-08-16  5:48     ` Michal Marek
2016-08-16  5:57       ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.20.1602101636250.17825@knanqh.ubzr \
    --to=nico@fluxnic.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.