RE: Linux PCI bus numbering algorithm

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

 



Hello Greg,

> What specific platform is this?  Have you looked at the kernel code
that
> does this?

This is a customized MPC8572 platform for which I'll be doing the
firmware. I need to do these PCI bus numberings, and thus want to know
how would have Linux have done it. Trusting that the Linux PCI bus
numbering would have been arrived at using a good algorithm, I plan to
borrow same idea in my code...

> > 1) Does Linux reserve & leave apart certain bus numbers at each PCI
> > bridge -in anticipation of new PCI cards (containing PCI bridges) to
be
> > hot-lugged later on to that location? If yes, how many bus numbers
does
> > it reserve at each bridge?
> 
> No, this is up to the BIOS/PCI controller interface (like ACPI).  See
> the PCI spec for details as to why this is so.
>

This would be a PPC platform on which there is no BIOS or the ACPI...
:-(

Thanks,

Rajat Jain


> -----Original Message-----
> From: Greg KH [mailto:greg@xxxxxxxxx]
> Sent: Wednesday, February 24, 2010 9:15 AM
> To: Rajat Jain
> Cc: linux-pci@xxxxxxxxxxxxxxx; linux-hotplug@xxxxxxxxxxxxxxx
> Subject: Re: Linux PCI bus numbering algorithm
> 
> On Wed, Feb 24, 2010 at 08:57:41AM +0530, Rajat Jain wrote:
> > Hi,
> >
> > I want to understand the algorithm Linux uses to enumerate and
assign
> > the PCI bus numbers on a HOT-PLUGGABLE system with DUMB FIRMWARE
that
> > has not done any PCI enumeration / resource allocation (Thus Linux
needs
> > to do it).
> 
> What specific platform is this?  Have you looked at the kernel code
that
> does this?
> 
> > 1) Does Linux reserve & leave apart certain bus numbers at each PCI
> > bridge -in anticipation of new PCI cards (containing PCI bridges) to
be
> > hot-lugged later on to that location? If yes, how many bus numbers
does
> > it reserve at each bridge?
> 
> No, this is up to the BIOS/PCI controller interface (like ACPI).  See
> the PCI spec for details as to why this is so.
> 
> > 2) Or is it totally dynamic i.e. no reserved (unused) bus numbers
are
> > available with any bridge. Hence when a PCI card (with PCI bridges
on
> > it) is hot-plugged, then new bus numbers are allocated for it, and
then
> > all the PCI bridges upstream are "fixed up" so as to include this
bus
> > numbers in their range. If yes, then wouldn't this mean renumbering
> > buses (perhaps leading to resource reconfiguration / reassignment?)
for
> > existing devices, thus possible interfering with the PCI devices
already
> > in use?
> 
> No pci devices are renumbered.
> 
> > 3) I also have similar question for resource assignment. Are they
also
> > reserved for hot-plug?
> 
> No.
> 
> good luck :)
> 
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux