[Xen-devel] [PATCH] arm64: remove PSR bit macros from uapi

Ian Campbell
2013-04-15T11:48:33Z

On Fri, 2013-04-12 at 17:17 +0100, Marc Zyngier wrote:
> On Fri, 12 Apr 2013 17:06:29 +0100, Ian Campbell <Ian.Campbell@citrix.com>
> wrote:
>
> [...]
>
> > On the flip side is there any reason for the Linux uapi headers to be
> > including architectural constants? e.g. the x86 uapi/ptrace.h doesn't
> > define the RFLAGS bits etc...
>
> My favourite userspace program (aka the other platform emulation that
> shall not ever be merged) needs it. QEMU probably will as well.
>
> Of course, we could define them locally, but that seems like a massive
> waste of perfectly innocent bytes.

I appreciate it's convenient but I'm not sure there is a shortage of
bytes in the world, especially for well known unchanging constants like
this. Your favourite userspace program is a bit of a special case since
it doesn't need to be portable to non-Linux (or I assume not).

Anyway, ignoring the red-herring I introduced the main point isn't that
uapi/ptrace.h includes these definitions (that seems to be OK, standards
wise and is useful to you etc) but rather that they end up infecting
signal.h too. I'll file a bug against glibc/ubuntu/linaro as soon as I
figure out which is the best target...

> or convince the power that be to merge
> the damned thing so we can include kernel headers with any remorse... ;-)

/me steps back several paces and puts away his barge pole. ;-)

Ian.