PCI Probe Question
Paul Mackerras
paulus at samba.org
Tue Jan 27 19:38:31 EST 2004
Greg KH writes:
> On Mon, Jan 26, 2004 at 07:11:49PM -0600, John Rose wrote:
> > How feasible is the generic portion of the patch below?
> >
> > Currently, the PCI probe code exports pci_scan_slot() for use by hotplug
> > (or dlpar) modules. This turns out to be a problem, because
> > pci_scan_slot() scans forward for 8 devfn values, starting at the one
> > passed in. We need pci_scan_device() to be available for module use.
>
> Wait, what's wrong with scanning for all 8 devfn values? That's what we
> have to do, right?
Hmmm, I don't think you want to scan all 8 values if it is a
single-function device, since it may well respond at all 8 function
addresses, or even do weird things if you access func != 0.
> > Scanning the pci_bus corresponding to a phb reveals 3 slots within 8
> > devfn values.
>
> What is a "phb"?
PCI host bridge. You know what that is, right? :)
> > Consider a phb with 3 slots at devfn values 58, 5a, and
> > 5e. A dlpar add of the first slot would call scan_slot() with 58, and
> > scan_slot() adds redudant pci_dev's for the 5a and 5e to the devices
> > list of the phb bus.
>
> So you are trying to individually add the different pci devices within
> the same device? Hm, that's not very nice. So you are not really
> talking about a physical slot here, right? You can divide up a physical
> device among partitions?
Well, the thing is that we have PCI-PCI bridges which are
multifunction devices, that is, you get 4 bridges in the one PCI
device. Each bridge typically has only one slot behind it, since the
bridge is where the hotplugging is done. And the hypervisor likes to
be able to hand out each slot to a different partition. So your
partition might get to access function 2 of the PCI-PCI bridge device
but not function 0.
Hope that makes it a little clearer.
Regards,
Paul.
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list