[PULL] fixes and clean ups for alpha

Matt Turner mattst88 at gmail.com
Thu Oct 15 18:43:37 PDT 2009


On Thu, Oct 15, 2009 at 4:41 PM, Michael Cree <mcree at orcon.net.nz> wrote:
> On 14/10/2009, at 2:24 PM, Matt Turner wrote:
>
>> Matt Turner (3):
>>     [alpha] don't return from void functions
>
> Do you realise that the routines therein (i.e. _dense_outb(), _dense_inb(),
> etc.) are not currently called from anywhere in the Xserver?  At least, that
> is the conclusion I came to when examining the code relevant to Alpha.  The
> routine _alpha_iobase_query() changes _alpha_outb() and similar to be
> _dense_outb(), etc., if a dense I/O mapping is detected, but this routine
> used to be called from some of the old PCI detection software that was
> shifted out to libpciaccess, and, as far as I can tell, is now not called
> from anywhere.  So _alpha_outb() remains pointing at _outb() even on dense
> systems and the _dense_outb(), etc.,  routines are now unused.

Ah, I missed that. Please take a look at the attached patch.

> The _dense_outb() routines just check whether the port is 0xffff or below;
> if so it calls _outb() else it does a direct memory access using the BWX
> instructions.  At the moment the Xserver code just calls _outb() without the
> check.  Whether that matters, or what the reason was for introducing the
> _dense_outb() routines in the first place, I don't know.  Maybe achieving
> some improved efficiency for dense systems?

God, what a disaster. X predates glibc, so it's understandable, but
the in/out/_in/_out stuff is a mess.

For instance, the out* routines X defines are of the format outb(port,
val), which matches with with BSD provides, whereas glibc/Linux uses
outb(val, port). Then, since they're named identically with functions
in glibc, we've got to do silly things like naming them _outb.

I've got to clean this up. Once that's done, I think we can probably
move what's left of lnx_ev56.c into compiler.h and clean up the
dense/sparse stuff.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-alpha-Remove-unused-code-_dense_-functions-iobase-st.patch
Type: application/octet-stream
Size: 6196 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091015/ca4830d5/attachment-0001.obj 


More information about the xorg-devel mailing list