Re: 2.6.25-rc8-mm1 panic in rpaphp_register_slot()

From: Benjamin Herrenschmidt
Date: Wed Apr 16 2008 - 18:16:21 EST



> The basic idea, which I keep botching on pSeries, is that when we
> make a call to pci_hp_register, we now need to pass it:
>
> pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus, int slot_nr)
>
> I am having trouble figuring out the slot_nr argument. Basically,
> I want to get the devfn of the slot we're looking at.

I haven't looked in details yet, but I can already tell that things on
pSeries aren't that simple because we don't necessarily know in advance
about "slots"...

When you add a physical PCI device to a partition, things can range from:

- A device gets added to an existing bridge (ie. slot)
- A whole P2P brigde gets added with that device below it (that's a slot too)
- A whole PCI host bridge gets added with that device below it (or with
a P2P bridge below it and the device below that).

In the later case, it's hard to have any concept of slot since you don't
know anything about the host bridge before it gets added to your partition :-)

So I'm not sure how much we can use of your slot infrastructure, I'll have
to look, I suspect it can cover some cases but not all of them.

Cheers,
Ben.


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