Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC arm64] samples/bpf: explicitly exclude sysreg sections with asm macros
Date: Wed, 15 Mar 2017 19:17:41 +0000	[thread overview]
Message-ID: <20170315191741.GB29452@leverpostej> (raw)
In-Reply-To: <20170315183130.GB32819@C02RW35GFVH8.dhcp.broadcom.net>

Hi,

On Wed, Mar 15, 2017 at 02:31:30PM -0400, Andy Gospodarek wrote:
> On Fri, Mar 10, 2017 at 08:41:13PM +0000, Mark Rutland wrote:
> > On Fri, Mar 10, 2017 at 02:26:56PM -0500, Andy Gospodarek wrote:
> > > On Fri, Mar 10, 2017 at 05:52:30PM +0000, Will Deacon wrote:
> > > > On Thu, Mar 09, 2017 at 06:18:12PM -0500, Andy Gospodarek wrote:

> > > > Why does asm cause compilation to fail?
> > > 
> > > It isn't the ASM itself that causes the compilation to fail, it's the
> > > ASM macros included inside the new ifdef that are problematic.  Here is
> > > what is seen per object file:
> > 
> > > ./arch/arm64/include/asm/barrier.h:62:23: note: expanded from macro
> > > '__smp_store_release'
> > >                 asm volatile ("stlr %1, %0"
> > > \
> > >                                     ^
> > > 1 warning generated.
> > > LLVM ERROR: Inline asm not supported by this streamer because we don't  <----  THIS LINE
> > > have an asm parser for this target
> > 
> > ... so as far as I can see it's the presence of any inline assembly that
> > the tool cannot handle, as LLVM tells us.

> > So why isn't this a problem on other architectures? They're going to
> > have equivalent inline asm getting pulled in, and these samples
> > presumably compiled on at least on architecture in the past.

> As far as I can tell (hoping my regex is proper), x86 doesn't have any
> inline assembly that introduces macros like this in any h-files.

Just to be clear, is the error quoted above at all relevant here?

The error is for an asm statement which does not use assembly macros, in
a different file.

In the error message, LLVM explicitly states that it does not have a
parser for this target's assembly -- which would be a problem for *any*
inline assembly.

How does that specific error relate to the use of assembly macros within
sysreg.h?

... has the wrong error been quoted above?

... does LLVM dump a misleading error message after seeing an assembly
macro (which it presumably can't handle)?

Thanks,
Mark.

  reply	other threads:[~2017-03-15 19:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 23:18 [RFC arm64] samples/bpf: explicitly exclude sysreg sections with asm macros Andy Gospodarek
2017-03-10 17:52 ` Will Deacon
2017-03-10 19:26   ` Andy Gospodarek
2017-03-10 20:41     ` Mark Rutland
2017-03-15 18:31       ` Andy Gospodarek
2017-03-15 19:17         ` Mark Rutland [this message]
2017-03-15 20:54           ` Andy Gospodarek
2017-03-16 10:42             ` Mark Rutland
2017-03-16 21:04               ` Andy Gospodarek
2017-03-17 11:11                 ` Robin Murphy
2017-03-17 13:58                   ` Andy Gospodarek
2017-03-17 16:57                     ` Robin Murphy
2017-03-17 17:04                       ` Mark Rutland
2017-03-17 17:43                       ` Andy Gospodarek
2017-03-17 17:17                 ` Mark Rutland
2017-03-10 18:13 ` Mark Rutland
2017-03-10 19:35   ` Andy Gospodarek

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=20170315191741.GB29452@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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