[PATCH RFC]: Generic Linux multi-domain PCI handling

Jesse Barnes jbarnes at virtuousgeek.org
Fri Dec 30 18:18:32 PST 2005


On Tuesday, December 27, 2005 10:29 pm, David S. Miller wrote:
> I've been plagued with having a sparc64 machine which is multi-domain
> PCI and my video card is on domain 1.  Instead of going off and
> forking the linuxPci.c code like was done for Alpha I tried to do
> something that would work on PPC and other non-sparc64 platforms.

Sounds good, in fact it would be nice to have a unified codebase for X 
on Linux platforms.  That would make it easier to port X to new 
platforms as it would only involve kernel work, rather than the 
situation we have now.

> Anyways, the general idea is to run over the dirents under
> /proc/bus/pci/ and if we find colon encoded directory names
> of the form "%x:%x" we use that to determine which domains
> exist on the machine.  This is implemented in the function
> linuxPci.c:probe_domains().

You want to stay out of /sys for compatibility reasons?  It already has 
several bits of other info that the X server needs, including PCI 
domain info, mmap'able PCI resources, per-bus I/O domains, config space 
files, and full device information (as the kernel sees it of course).  
Would be nice if X used it instead of /dev/mem.  There's some 
documentation about the interfaces at 
Documentation/filesystems/sysfs-pci.txt iirc.

Jesse



More information about the xorg mailing list