public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Ian.Campbell@citrix.com (Ian Campbell)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: remove PSR bit macros from uapi
Date: Fri, 12 Apr 2013 16:50:34 +0100	[thread overview]
Message-ID: <1365781834.15783.107.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20130412151835.GK12363@mudshark.cambridge.arm.com>

On Fri, 2013-04-12 at 16:18 +0100, Will Deacon wrote:
> Hi Ian,
> 
> On Fri, Apr 12, 2013 at 04:09:59PM +0100, Ian Campbell wrote:
> > Exposing these in ptrace.h ends up polluting the namespace for user
> > applications which include headers such as <signal.h>, e.g. when building Xen
> > userspace tools on arm64:
> > 
> > tools/include/xen/arch-arm.h:229:0: error: "PSR_MODE_EL0t" redefined [-Werror]
> > In file included from /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/include/sys/user.h:25:0,
> >                  from /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/include/sys/procfs.h:34,
> >                  from /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/include/sys/ucontext.h:26,
> >                  from /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/include/signal.h:360,
> >                  from xentrace.c:21:
> > /usr/lib/gcc-cross/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/include/asm/ptrace.h:30:0: note: this is the location of the previous definition
> 
> Strange... I don't see the PSR definitions in any headers other than
> ptrace.h for my aarch64 toolchain.

It's the definition in ptrace.h which is the problem, since it conflicts
with the application's own definitions (Xen userspace in this case). The
names are in the "applications" namespace (i.e. not prefixed with _) and
it hasn't included any headers which are defined to cause those names to
be used.

I'm not sure which (if any) spec includes ptrace.h but signal.h isn't
defined to #define PSR_FOO. Maybe the real bug is the signal.h ends up
including ptrace.h at all?

>  Which tools are you using?

Ubuntu Raring multiarch cross thing, which is gcc 4.7.2-22ubuntu3 and
glibc 2.17-0ubuntu4.

Ian.

  reply	other threads:[~2013-04-12 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 15:09 [PATCH] arm64: remove PSR bit macros from uapi Ian Campbell
2013-04-12 15:18 ` Will Deacon
2013-04-12 15:50   ` Ian Campbell [this message]
2013-04-12 16:06     ` [Xen-devel] " Ian Campbell
2013-04-12 16:17       ` Marc Zyngier
2013-04-15 11:48         ` Ian Campbell
2013-04-15 12:28           ` Ian Campbell

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=1365781834.15783.107.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.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