[lkml]   [2003]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: pci_domain_nr vs. /sys/devices
On Tue, Jun 17, 2003 at 02:49:48PM +1000, Anton Blanchard wrote:
> And only creates /proc/bus/pci entries for the first domain.

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.

> Finally there was some shuffling required to make pci_bus_exists work
> (passing in a pci_bus *, ->sysdata and ->number must be initialised
> before calling it). There are some uses of pci_bus_exists in x86 that
> will need updating.
> Thoungts?

Looks good to me, except this (see above):

> + /* Backwards compatibility for domain 0 only */
> + if (pci_domain_nr(dev->bus) != 0)
> + return 0;

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.083 / U:4.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site