linux/arch/ppc64
Paul Mackerras 4267292b0f ppc64: Set up PCI tree from Open Firmware device tree
This adds code which gives us the option on ppc64 of instantiating the
PCI tree (the tree of pci_bus and pci_dev structs) from the Open
Firmware device tree rather than by probing PCI configuration space.
The OF device tree has a node for each PCI device and bridge in the
system, with properties that tell us what addresses the firmware has
configured for them and other details.

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.  The firmware
tells us about the address ranges that they pass in the OF device
tree.

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.

I have implemented a platform-specific function which is called for
each PCI bridge (host or PCI-PCI) to say whether the code should look
in the device tree or use normal PCI probing for the devices under
that bridge.  On pSeries machines we use the device tree if we're
running under a hypervisor, otherwise we use normal probing.  On
powermacs we use normal probing for the AGP bridge, since the device
for the AGP bridge itself isn't shown in the device tree (at least on
my G5), and the device tree for everything else.

This has been tested on a dual G5 powermac, a partition on a POWER5
machine (running under the hypervisor), and a legacy iSeries
partition.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-09-12 17:17:36 +10:00
..
boot [PATCH] PPC64: large INITRD causes kernel not to boot 2005-09-09 22:11:37 +10:00
configs [PATCH] ppc64: Add CONFIG_HZ 2005-08-30 13:40:02 +10:00
kernel ppc64: Set up PCI tree from Open Firmware device tree 2005-09-12 17:17:36 +10:00
lib [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
mm Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-09 15:46:49 -07:00
oprofile [PATCH] ppc64: Move oprofile_model into cpu feature struct 2005-09-06 16:09:21 +10:00
xmon [PATCH] ppc64: Take udbg out of ppc_md 2005-09-06 16:07:36 +10:00
defconfig [PATCH] ppc64: Add CONFIG_HZ 2005-08-30 13:40:02 +10:00
Kconfig [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
Kconfig.debug [PATCH] ppc64: update xmon helptext 2005-09-05 00:06:01 -07:00
Makefile [PATCH] powerpc: Move include3 to arch/$(ARCH)/include 2005-09-10 10:15:12 -07:00