[PATCH 6/9] Use proper membar instructions on SPARC
Matt Turner
mattst88 at gmail.com
Wed Aug 12 23:28:53 PDT 2009
On Thu, Aug 13, 2009 at 1:51 AM, David Miller<davem at davemloft.net> wrote:
> From: Matt Turner <mattst88 at gmail.com>
> Date: Thu, 13 Aug 2009 01:45:39 -0400
>
>> Cc: David S. Miller <davem at davemloft.net>
>> Cc: Alan Coopersmith <alan.coopersmith at sun.com>
>> Signed-off-by: Matt Turner <mattst88 at gmail.com>
>
> This breaks 32-bit sparc.
>
> It will cause the binaries built to be tagged as needing v8plus or v9
> instructions. They therefore won't execute or load on a 32-bit sparc
> system.
>
> That's why I encoded the membars using explicit instruction constants,
> rather than using the usual mnemonics.
Surely gcc defines a macro we can check for? Something like __sparcv9
or __arch64__? What is preferred?
I wanted to do something like this, but I wasn't sure if (1) we needed
to worry about 32-bit sparc or (2) what the correct macros were.
#ifdef sparc
# ifdef sparc64
<...>
# elif defined sparc32
<...>
#endif
On another note, are load barriers not needed for in{b,w,l} and
xf86ReadMmio* functions?
Thanks,
Matt
More information about the xorg-devel
mailing list