[PULL] bus cleanup, darwin hw/xfree86, build regression fixes

Mark Kettenis mark.kettenis at xs4all.nl
Sat Sep 24 06:26:15 PDT 2011


> From: Jeremy Huddleston <jeremyhu at apple.com>
> Date: Sat, 24 Sep 2011 04:11:31 -0700
> 
> > Only a few drivers actually use domainIOBase, but among those are
> > xf86-video-vesa and xf86-video-vmware drivers, which are pretty
> > important ones.  The others are xf86-video-ark, xf86-video-sis and
> > xf86-video-tdfx.  These drivers are fairly easy to "fix" by replacing
> > domainIOBase by 0.  That will of course break the usage of these
> > drivers on systems with multiple PCI domains.  That can only be fixed
> > by proper conversion of these drivers to use the appropriate
> > libpciaccess interfaces instead of assuming legacy space is mapped and
> > doing in/out directly.  None of these drivers matter to me for
> > OpenBSD/sparc64, which is the only architecture with multiple PCI
> > domains that we run on.  But Linux people might care, for example for
> > POWER systems.  Remember that multiple domain support was one of the
> > reasons for deveoping libpciaccess in the first place!
> 
> > IOADDRESS is used massively throughout the drivers.  I really don't
> > see why it needs to be removed.  Leaving the typedef in xf86Pci.h will
> > save you/us a lot of work.  At that point you might as well drop the
> > changesto remove IOADDRESS usage in the int10 module.
> 
> I think this is a good step in the right direction, and if we're
> going to go through a small amount of pain for little gain or a
> moderate amount of pain for better gains, I'll pick the latter.

I beg to differ.

> IOADDRESS is used for multiple types (ioports) in the legacy API, so
> it's better to just get rid of it and avoid confusion/collision.

Multiple types?  It is really only used as an address/offset into IO
port space.  And using a special typedef for those actually unconfuses
things, since it clearly marks variables as such.

> It's not *THAT* hard to change the types in the drivers.

It's still work.  And it probably inflicts pain on people like Micahel
Daenzer who maintain drivers for older xserver releases.  And it also
inflicts pain on people who maintain drivers out of the git
repositories on freedesktop.org.  Like the xf86-video-intel driver we
have on OpenBSD with forward ported modesetting changes.

I don't really object to the canges to the in10 module (although the
libpciaccess API uses uint32_t instead of unsigned int).  But please
keep the IOADDRESS typedef until the majority of the video drivers
have been converted to use the libpciaccess API to do port IO.

> If the drivers need multiple PCI domains, then perhaps this is a
> good time to start divorcing those drivers from using the bus
> support in hw/xfree86 and start using libpciaccess directly.

Right.


More information about the xorg-devel mailing list