[RFC/PATCH] Set up PCI tree from OF on ppc64

Segher Boessenkool segher at kernel.crashing.org
Fri Aug 26 01:42:07 EST 2005


> There are a couple of reasons why this is needed.  First, on systems
> with a hypervisor, there is a PCI-PCI bridge per slot under the PCI
> host bridges.  These PCI-PCI bridges have special isolation features
> for virtualization.  We can't write to their config space, and we are
> not supposed to be reading their config space either.

Then the hypervisor should just hide these bridges from us (or fake
all accesses to it).

> Secondly, on powermacs, the interrupt controller is in a PCI device
> that may be behind a PCI-PCI bridge.  If we happened to take an
> interrupt just at the point when the device or a bridge on the path to
> it was disabled for probing, we would crash when we try to access the
> interrupt controller.

Why does it have to be disabled for probing?  The kernel really
shouldn't change bus numbers and address ranges and BARs if the
firmware already has done this.  If the firmware has disabled a
device (or bridge, or just some BARs), it probably has a good
reason to do so.  On the other hand, there might be a lot of
broken firmwares out there, of course -- but not nearly as much
as on x86, so we don't need all those fixups they use.

So, in short, I'm fine with your patch, as it will solve some
problems, but I don't think it is the best way to go.

I didn't review or try your actual patch yet; will try to do that
soon, though.


Segher


p.s.  Here is a patch fragment I use to work around / fix PCI
probing brokenness:


@@ -233,11 +233,11 @@ static int __init pcibios_init(void)
  #ifndef CONFIG_PPC_ISERIES
         if (pci_probe_only)
                 pcibios_claim_of_setup();
-       else
-               /* FIXME: `else' will be removed when
-                  pci_assign_unassigned_resources() is able to work
-                  correctly with [partially] allocated PCI tree. */
-               pci_assign_unassigned_resources();
  #endif /* !CONFIG_PPC_ISERIES */

         /* Call machine dependent final fixup */




More information about the Linuxppc64-dev mailing list