public inbox for linux-arm-kernel@lists.infradead.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: Fri, 17 Mar 2017 17:17:44 +0000	[thread overview]
Message-ID: <20170317171744.GM5940@leverpostej> (raw)
In-Reply-To: <20170316210454.GA53792@C02RW35GFVH8.dhcp.broadcom.net>

On Thu, Mar 16, 2017 at 05:04:55PM -0400, Andy Gospodarek wrote:
> On Thu, Mar 16, 2017 at 10:42:04AM +0000, Mark Rutland wrote:
> > On Wed, Mar 15, 2017 at 04:54:04PM -0400, Andy Gospodarek wrote:
> > > On Wed, Mar 15, 2017 at 07:17:41PM +0000, Mark Rutland wrote:
> > > > 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:

> > > > > > ... so as far as I can see it's the presence of any inline assembly that
> > > > > > the tool cannot handle, as LLVM tells us.

> > > LLVM ERROR: Inline asm not supported by this streamer because we
> > > don't have an asm parser for this target
> > > 
> > > Upon inspection it does not appear that this is explicitly related to
> > > assembly macros, just simple inline assembly. 

> You are correct that it appears llvm cannot process any inline asm for
> arm64.  Sadly (or luckily) the inability to process this is not a
> hard-requirement for llvm to properly compile code that includes these
> h-files -- as long as none of #defines/c-macros/inline functions are
> actually *called* in the code I'm trying to compile.

The Linux-internal arm64 headers are there to build the kernel using a
supported toolchain. From my PoV, if you want to use the Linux-internal
arm64 headers, you need to be compatible with the toolchain(s) that we
target. 

I would imagine the x86 developers would have a similar feeling, were
this issue to crop up on x86.

> Sorry I continue to harp on this, but I've been testing XDP on ARM64
> using some Broadcom SoCs and I'm seeing some really nice performance
> benefits to being able to process so many frames per second using a
> smaller footprint device.  I'd like to see the ARM64 XDP user community
> grow, but without the ability to easily compile the samples in the
> upstream kernel tree today I just don't see this user- or developer-base
> growing.  

Please talk to the LLVM community, and see what is necessary in order to
make it compatible with the toolchains we support.

> > It sounds like the toolchain you are using is lacking in functionality
> > that is presumably present when targeting x86, or the error messages are
> > simply misleading. In either case, there's a toolchain issue to be
> > addressed, and not a kernel issue.
> 
> While I generally agree isn't the entire reason this inline asm exists
> -- to fix a binutils issue?  :-)
> 
> commit 72c5839515260dce966cd24f54436e6583288e6c
> Author: Catalin Marinas <catalin.marinas@arm.com>
> Date:   Thu Jul 24 14:14:42 2014 +0100
> 
>     arm64: gicv3: Allow GICv3 compilation with older binutils

We introduced this code so as to *retain* compatibility with a toolchain
that we explicitly supported, but accidentally broke with the addition
of the GICv3 code.

We have clearly never supoprted a toolchain that cannot parse inline
asembly.

Thanks,
Mark.

  parent reply	other threads:[~2017-03-17 17: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
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 [this message]
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=20170317171744.GM5940@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