linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Michal Marek <mmarek@suse.com>,
	Adam Borowski <kilobyte@angband.pl>,
	Omar Sandoval <osandov@osandov.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM
Date: Sun, 20 Nov 2016 19:12:57 +0000	[thread overview]
Message-ID: <20161120191257.GX1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <CA+55aFxh=F77vDAG0Ta9p7Fxf8-b4nCSv1ewfY6ikx3X42zwkA@mail.gmail.com>

On Sun, Nov 20, 2016 at 10:32:50AM -0800, Linus Torvalds wrote:
> On Sun, Nov 20, 2016 at 5:21 AM, Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> > On Tue, Oct 25, 2016 at 07:32:00PM +1100, Nicholas Piggin wrote:
> >>
> >> Michal, what's your thoughts? If you merge my patch 2/2 and skip 1/2, it
> >> should not give any new build warnings or errors, so then arch patches can
> >> go via arch trees. 1/2 could go in after everyone is up to date.
> >
> > So what's the conclusion on this?  I've just had a failure due to
> > CONFIG_TRIM_UNUSED_KSYMS reported on ARM, and it looks like (at
> > least some of) patch 1 could resolve it.
> 
> Hmm. I've got
> 
>   cc6acc11cad1 kbuild: be more careful about matching preprocessed asm
> ___EXPORT_SYMBOL
>   4efca4ed05cb kbuild: modversions for EXPORT_SYMBOL() for asm
> 
> in my tree. Is that sufficient, or do we still have issues?

Hmm, those seem to have gone in during the last week, so I haven't
tested it yet (build running, but it'll take a while).  However, I
don't think they'll solve _this_ problem.

Some of the issue here is that we use a mixture of assembly macros
and preprocessor for the ARM bitops - the ARM bitops are created
with an assembly macro which contains some pre-processor expanded
macros (eg, EXPORT_SYMBOL()).

This means that the actual symbol being exported is not known to
the preprocessor, so doing the "__is_defined(__KSYM_##sym)" inside
"EXPORT_SYMBOL(\name)" becomes "__is_defined(__KSYM_\name)" to the
preprocessor.  As "__KSYM_\name" is never defined, it always comes
out as zero, hence we always use __cond_export_sym_0, which omits
the symbol export from the assembly macro definition:

 .macro bitop, name, instr
.globl \name ; .align 0 ; \name:

...

.type \name, %function; .size \name, .-\name

 .endm

In other words, using preprocessor macros inside an assembly macro
may not work as expected, and now leads to config-specific failures.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2016-11-20 19:12 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161017065131.GA27863@angband.pl>
2016-10-17  6:59 ` [GIT PULL] kbuild changes for v4.9-rc1 Nicholas Piggin
2016-10-17  6:59   ` Nicholas Piggin
2016-10-17 10:01   ` Adam Borowski
2016-10-17 10:01     ` Adam Borowski
2016-10-17 11:12     ` Alexey Dobriyan
2016-10-17 11:12       ` Alexey Dobriyan
2016-10-17 11:17       ` Geert Uytterhoeven
2016-10-17 11:32         ` Alexey Dobriyan
2016-10-17 11:32           ` Alexey Dobriyan
2016-10-17 12:22     ` Mathieu OTHACEHE
2016-10-18  0:16       ` Adam Borowski
2016-10-18  0:16         ` Adam Borowski
2016-10-18  1:34         ` Nicholas Piggin
2016-10-19 14:38           ` Michal Marek
2016-10-19 14:38             ` Michal Marek
2016-10-20  3:52             ` Nicholas Piggin
2016-10-20  3:52               ` Nicholas Piggin
2016-10-27  8:10               ` Kalle Valo
2016-10-27  8:10                 ` Kalle Valo
2016-10-27 11:15                 ` Nicholas Piggin
2016-10-27 11:15                   ` Nicholas Piggin
2016-10-27 13:14                   ` Kalle Valo
2016-10-27 13:14                     ` Kalle Valo
2016-10-27 13:25                     ` Nicholas Piggin
2016-10-27 13:25                       ` Nicholas Piggin
2016-10-30 10:51                 ` Thorsten Leemhuis
2016-10-30 10:51                   ` Thorsten Leemhuis
2016-11-01 15:48           ` Michal Marek
2016-11-01 15:48             ` Michal Marek
2016-11-02 12:11             ` Adam Borowski
2016-11-02 12:11               ` Adam Borowski
2016-11-02 12:14               ` [PATCH] kbuild: provide include/asm/asm-prototypes.h for x86 Adam Borowski
2016-11-02 12:14                 ` Adam Borowski
2016-12-16 19:55     ` [GIT PULL] kbuild changes for v4.9-rc1 Jiri Slaby
2016-12-16 19:55       ` Jiri Slaby
2016-12-16 19:57       ` Linus Torvalds
2016-12-17  8:57         ` Jiri Slaby
2016-12-17  8:57           ` Jiri Slaby
2016-12-17  9:33           ` Adam Borowski
2016-12-17  9:33             ` Adam Borowski
2016-12-17 23:59           ` Linus Torvalds
2016-12-17 23:59             ` Linus Torvalds
2016-12-18 10:49             ` Jiri Slaby
2016-12-18 11:03               ` Arend Van Spriel
2016-12-18 11:03                 ` Arend Van Spriel
2016-12-18 13:27                 ` Nikolay Borisov
2016-12-18 13:27                   ` Nikolay Borisov
2016-12-18 14:45                   ` Jiri Slaby
2016-12-18 14:54                     ` Nikolay Borisov
2016-12-18 15:08                       ` Jiri Slaby
2016-10-17 12:26   ` [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Arnd Bergmann
2016-10-19 14:52     ` Michal Marek
2016-10-19 14:52       ` Michal Marek
2016-10-19 15:02       ` Arnd Bergmann
2016-10-19 15:02         ` Arnd Bergmann
2016-10-19 15:32         ` Russell King - ARM Linux
2016-10-19 15:32           ` Russell King - ARM Linux
2016-10-20  4:08           ` Nicholas Piggin
2016-10-20 13:17             ` Russell King - ARM Linux
2016-10-20 13:17               ` Russell King - ARM Linux
2016-10-20 14:20               ` Nicholas Piggin
2016-10-20 14:20                 ` Nicholas Piggin
2016-10-20 14:33                 ` Russell King - ARM Linux
2016-10-20 14:33                   ` Russell King - ARM Linux
2016-10-20 14:51                   ` Nicholas Piggin
2016-10-20 14:51                     ` Nicholas Piggin
2016-10-22 19:51                   ` Michal Marek
2016-10-24 15:04             ` Arnd Bergmann
2016-10-24 15:05               ` [PATCH 1/2] " Arnd Bergmann
2016-10-24 15:05                 ` Arnd Bergmann
2016-10-25  8:32                 ` Nicholas Piggin
2016-11-20 13:21                   ` Russell King - ARM Linux
2016-11-20 18:32                     ` Linus Torvalds
2016-11-20 19:12                       ` Russell King - ARM Linux [this message]
2016-11-20 19:12                         ` Russell King - ARM Linux
2016-11-21  6:10                         ` Nicholas Piggin
2016-11-21  6:10                           ` Nicholas Piggin
2016-11-21 18:46                 ` Bug#844530: [1/2] " Uwe Kleine-König
2016-11-21 18:46                   ` Uwe Kleine-König
2016-11-21 19:13                   ` Russell King - ARM Linux
2016-11-21 19:13                     ` Russell King - ARM Linux
2016-11-22  1:01                     ` Nicholas Piggin
2016-10-24 15:06               ` [PATCH 2/2, variant A] ARM: add hidden mmioset/mmiocpy prototypes Arnd Bergmann
2016-10-24 15:06                 ` Arnd Bergmann
2016-10-24 15:06               ` [PATCH 2/2, variant B] ARM: move mmiocpy/mmioset exports to io.c Arnd Bergmann
2016-10-24 15:06                 ` Arnd Bergmann
2016-10-20  7:37           ` [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Geert Uytterhoeven
2016-10-20  8:20             ` Russell King - ARM Linux
2016-10-20  8:20               ` Russell King - ARM Linux
2016-10-20  8:23               ` Geert Uytterhoeven
2016-10-20  8:23                 ` Geert Uytterhoeven
2016-11-22 11:05 [PATCH 1/2] " Arnd Bergmann
2016-11-22 16:34 ` Nicolas Pitre
2016-11-22 16:34   ` Nicolas Pitre
2016-11-23  0:41   ` Russell King - ARM Linux
2016-11-23  0:41     ` Russell King - ARM Linux
2016-11-23  1:40     ` Nicholas Piggin
2016-11-23  1:04   ` Nicholas Piggin
2016-11-23  1:04     ` Nicholas Piggin
2016-11-23  1:35     ` Nicolas Pitre
2016-11-23  9:33       ` Russell King - ARM Linux
2016-11-23  9:33         ` Russell King - ARM Linux
2016-11-23 10:36         ` Russell King - ARM Linux
2016-11-23 10:36           ` Russell King - ARM Linux
2016-11-27  2:33           ` Nicolas Pitre
2016-11-27  2:33             ` Nicolas Pitre

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=20161120191257.GX1041@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=adobriyan@gmail.com \
    --cc=arnd@arndb.de \
    --cc=kilobyte@angband.pl \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=npiggin@gmail.com \
    --cc=osandov@osandov.com \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).