linux/arch
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
..
alpha [PATCH] alpha: fix-up schedule_timeout() usage 2005-09-10 10:06:37 -07:00
arm kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
arm26 kbuild: arm26,sparc use generic asm-offset support 2005-09-09 20:35:55 +02:00
cris kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
frv kbuild: frv,m32r,sparc64 introduce fake asm-offsets.h file 2005-09-09 22:47:53 +02:00
h8300 kbuild: h8300,m68knommu,sh,sh64 use generic asm-offsets.h support 2005-09-09 20:28:49 +02:00
i386 [PATCH] i386 / uml: add dwarf sections to static link script 2005-09-10 12:00:17 -07:00
ia64 Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-09-11 15:51:40 -07:00
m32r [PATCH] Remove even more stale references to Documentation/smp.tex 2005-09-10 10:06:24 -07:00
m68k Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-09 15:46:49 -07:00
m68knommu Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-09 15:46:49 -07:00
mips mips: rename offsets.c to asm-offsets.c 2005-09-11 22:35:18 +02:00
parisc [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
ppc kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
ppc64 ppc64: Set up PCI tree from Open Firmware device tree 2005-09-12 17:17:36 +10:00
s390 [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
sh kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
sh64 kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
sparc [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
sparc64 [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
um kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00
v850 [PATCH] V850: C99 initializers for hw_interrupt_type structures 2005-09-10 10:06:27 -07:00
x86_64 [PATCH] x86_64 linker script cleanups for debug sections 2005-09-10 12:00:17 -07:00
xtensa kbuild: rename prepare to archprepare to fix dependency chain 2005-09-11 22:30:22 +02:00