Re: pci_domain_nr vs. /sys/devices

From: Anton Blanchard (anton@samba.org)
Date: Tue Jun 17 2003 - 07:49:50 EST


Hi,
 
> Err, this definitely breaks X on alpha. On small and mid-range
> machines we always have pci_domain_nr(bus) == bus->number.
> Practically, it's only Marvel where we could overflow an 8-bit
> bus number.

OK.
 
> How about this instead?
>
> /* Backwards compatibility for first N PCI domains. */
> if (pci_domain_nr(dev->bus) > PCI_PROC_MAX_DOMAIN)
> return 0;
>
> PCI_PROC_MAX_DOMAIN could be defined in asm/pci.h (255 on alpha), default 0.

A runtime test would be useful, at least for ppc64. That would allow our
older machines to work (multiple host bridges without overlapping
buses). What if we had pci_proc_max_domain and arch code could change its
value during pcibios_init?

Anton
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:20 EST