[PATCH] Revert "Make sys.c use unaligned access functions provided in compiler."

Matt Turner mattst88 at gmail.com
Tue Dec 29 10:32:05 PST 2009


On Tue, Dec 29, 2009 at 8:42 AM, Tiago Vignatti
<tiago.vignatti at nokia.com> wrote:
> On Mon, Dec 28, 2009 at 08:02:02PM +0100, ext Matt Turner wrote:
>> On Mon, Dec 28, 2009 at 11:00 AM, Tiago Vignatti
>> <tiago.vignatti at nokia.com> wrote:
>> > Sorry to not scream before about it, when the patch came to xorg-devel review.
>> >
>> > Now I could try to fix the issue of the patch, but I'm not happy with its
>> > approach: the patch is using a header from the server inside x86emu. There's
>> > no conceptual problem on it but it will complicates when we try to remove
>> > x86emu from the server (my ongoing work - using lrmi).
>> >
>> > So I'd be happy to just revert such patch now.
>
> ...
>
>
>> The fix here isn't to add back in a bunch of duplicated Alpha assembly.
>>
>> It this needs its own unaligned access code, then copy the platform
>> agnostic code from compiler.h. That is, the code like
>>
>> static __inline__ uint32_t ldl_u(uint32_t *p)
>> {
>>     const struct __una_u32 *ptr = (const struct __una_u32 *) p;
>>     return ptr->x;
>> }
>>
>> But please, do not add back in the Alpha assembly.
>>
>> I understand that ARM-specific nastiness in compiler.h (lines
>> compiler.h:1017-1019) causes sys.c to not compile--there is an
>> appropriate fix and this is not it.
>>
>> Maybe move ARM away from out{b,w,l} to the new pci access routines ajax wrote?
>
> Okay okay okay... but you missed my argument why I'm against your approach.
>
> So again: compiler.h would be the first header from X inside x86emu. By nature
> x86emu should not be inside X. So, adding a header from Xorg inside x86emu is
> just coupling even more the entire server. We're more than never trying to
> decouple modules, components and os routines in our X implementation.

No, I understood you. If we want to decouple things like this, that's
cool. It's a good goal. It also wasn't your reason for having it
reverted before.

I just think you should send a patch that copies the unaligned access
routines from compiler.h into sys.c, and removing #include
"compiler.h".

Reverting this commit _and then_ doing what I suggest seems like it's
taking an extra arbitrary step to get to the same place. A straight
revert looks to me like it causes sys.c to not have appropriate
unaligned access routines for mips, sparc, et al.

Then again, as long as x86emu is inside the xserver git repo, I don't
see the harm in including some static inline functions from the
xserver.

Matt


More information about the xorg-devel mailing list