[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#284111: xserver-xfree86: Doesn't scan PCI domains above 0000 on startup



On Thu, 2005-01-13 at 17:59 -0500, Branden Robinson wrote:
> On Fri, Dec 31, 2004 at 12:18:29AM -0800, David Mosberger wrote:
> >   Branden> I wonder how many domains we should look for before we give
> >   Branden> up.  I get the feeling doing an ftw() on /proc/pci/pci is
> >   Branden> not a good idea.  Even doing as much as a readdir() feels
> >   Branden> wrong, but maybe not.  :-P

I think readdir() should be kosher.  "ls" in /proc/bus/pci
has to get its data somehow.

But I'm confused about why we would iterate through all
the domains anyway, since we don't seem to iterate through
all PCI buses.  Maybe X's PCITAG doesn't include a domain,
or maybe there's no config file syntax for specifying it?

> > I'm not terribly familiar with multi-domain machines.  From what I
> > recall, the domain-changes to /proc/bus/pci were SPARC-specific and
> > I'm not sure whether that approach is the final answer.

The domain changes to /proc/bus/pci are implemented for
sparc64, ppc64, ia64, alpha, and mips (see pci_name_bus()).
They aren't all identical (sparc64 uses %04x:%02x always,
while ia64 uses %04x:%02x only for non-zero domain), but
they look close enough that one could try %02x first, then
%04x:%02x.

I added Matthew Wilcox in case he has additional input.




Reply to: