kernel-ark/arch/ppc64/kernel
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
..
vdso32 kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
vdso64 kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
align.c
asm-offsets.c [PATCH] Dynamic hugepage addresses for ppc64 2005-08-29 10:53:38 +10:00
binfmt_elf32.c
bitops.c
bpa_iic.c [PATCH] ppc64: fix IPI on bpa_iic 2005-09-09 22:11:34 +10:00
bpa_iic.h [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
bpa_iommu.c [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
bpa_iommu.h [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
bpa_nvram.c [PATCH] ppc64: add a minimal nvram driver 2005-06-23 09:43:31 +10:00
bpa_setup.c [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
btext.c [PATCH] remove linux/version.h include from arch/ppc64 2005-09-06 16:57:46 +10:00
cpu_setup_power4.S [PATCH] merge some from Rusty's trivial patches 2005-09-10 10:06:30 -07:00
cputable.c [PATCH] ppc64: Fix build with oprofile disabled 2005-09-06 16:09:22 +10:00
dma.c [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
eeh.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
entry.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
firmware.c [PATCH] ppc64: make firmware_has_feature() stronger 2005-08-29 10:53:35 +10:00
head.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
HvCall.c
hvCall.S
hvconsole.c [PATCH] hvc_console: Separate the NUL character filtering from get_hvc_chars 2005-07-07 18:23:40 -07:00
hvcserver.c
HvLpConfig.c
HvLpEvent.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
i8259.c
i8259.h
idle_power4.S kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
idle.c [PATCH] ppc64: idle fixups 2005-07-07 18:23:41 -07:00
init_task.c
ioctl32.c
iomap.c Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-09-09 10:38:02 -07:00
iommu.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
irq.c Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-06-30 08:48:56 -07:00
iSeries_htab.c [PATCH] ppc64: Remove redundant uses of physRpn_to_absRpn 2005-08-29 10:53:36 +10:00
iSeries_iommu.c [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
iSeries_irq.c [PATCH] ppc64 iSeries: tidy up irq code after merge 2005-06-21 18:46:30 -07:00
iSeries_pci.c [PATCH] ppc64 iSeries: remove some more members of iSeries_Device_Node 2005-06-21 18:46:30 -07:00
iSeries_proc.c [PATCH] ppc64: Move xItLpQueue proc code into ItLpQueue.c 2005-06-30 15:08:44 +10:00
iSeries_setup.c [PATCH] ppc64: Move ppc64_enable_pmcs() logic into a ppc_md function 2005-08-29 10:53:38 +10:00
iSeries_setup.h
iSeries_smp.c [PATCH] ppc64 iSeries: eliminate some unused inline functions 2005-06-21 18:46:28 -07:00
iSeries_vio.c [PATCH] Create vio_bus_ops 2005-08-30 13:23:47 +10:00
iSeries_VpdInfo.c [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
ItLpQueue.c [PATCH] ppc64: Replace custom locking code with a spinlock 2005-06-30 15:17:02 +10:00
kprobes.c [PATCH] kprobes: fix bug when probed on task and isr functions 2005-09-07 16:58:01 -07:00
lmb.c [PATCH] ppc64: Simplify some lmb functions 2005-08-29 10:53:37 +10:00
lparcfg.c [PATCH] ppc64: Allow world readable /proc/ppc64/lparcfg 2005-09-06 16:07:54 +10:00
LparData.c [PATCH] ppc64: msChunks cleanups 2005-08-29 10:53:35 +10:00
lparmap.c [PATCH] iSeries build with newer assemblers and compilers 2005-08-16 21:06:25 -07:00
machine_kexec.c [PATCH] ppc64: fix for kexec boot issue 2005-08-04 13:00:55 -07:00
Makefile [PATCH] ppc64: Split SCC and 15550 udbg code 2005-09-06 16:07:36 +10:00
maple_pci.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
maple_setup.c [PATCH] ppc64: Make udbg_init_uart set the ppc_md udbg methods. 2005-09-06 16:07:36 +10:00
maple_time.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
mf.c [PATCH] ppc64: Don't count number of events processed for caller 2005-06-30 15:15:53 +10:00
misc.S Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-09 15:46:49 -07:00
module.c
mpic.c [PATCH] ppc64: fix for kexec boot issue 2005-08-04 13:00:55 -07:00
mpic.h [PATCH] ppc64: fix for kexec boot issue 2005-08-04 13:00:55 -07:00
nvram.c [PATCH] ppc64: simplify nvram partition scanning code 2005-06-28 20:33:49 +10:00
of_device.c [PATCH] ppc64: of_device.c remove useless code 2005-08-30 13:42:33 +10:00
pacaData.c [PATCH] ppc64: Add VMX save flag to VPA 2005-09-05 00:06:01 -07:00
pci_direct_iommu.c
pci_dn.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pci_iommu.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pci.c ppc64: Set up PCI tree from Open Firmware device tree 2005-09-12 17:17:36 +10:00
pci.h [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pmac_feature.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pmac_low_i2c.c
pmac_nvram.c
pmac_pci.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pmac_setup.c ppc64: Set up PCI tree from Open Firmware device tree 2005-09-12 17:17:36 +10:00
pmac_smp.c [PATCH] ppc64: Fix g5 hw timebase sync 2005-05-23 11:51:24 -07:00
pmac_time.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
pmac.h
pmc.c [PATCH] more SPIN_LOCK_UNLOCKED -> DEFINE_SPINLOCK conversions 2005-09-09 14:03:48 -07:00
ppc_ksyms.c [PATCH] ppc64: Add missing exports 2005-06-27 15:11:43 -07:00
proc_ppc64.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
process.c [PATCH] ppc64: make firmware_has_feature() stronger 2005-08-29 10:53:35 +10:00
prom_init.c [PATCH] remove linux/version.h include from arch/ppc64 2005-09-06 16:57:46 +10:00
prom.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pSeries_hvCall.S [PATCH] ppc64: enforce medium thread priority in hypervisor calls 2005-05-01 08:58:46 -07:00
pSeries_iommu.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
pSeries_lpar.c [PATCH] ppc64: Take udbg out of ppc_md 2005-09-06 16:07:36 +10:00
pSeries_nvram.c
pSeries_pci.c [PATCH] pSeries - read irqs dynamically 2005-06-23 17:09:54 +10:00
pSeries_reconfig.c [PATCH] PPC64: convert kcalloc to kzalloc 2005-09-07 16:57:45 -07:00
pSeries_setup.c ppc64: Set up PCI tree from Open Firmware device tree 2005-09-12 17:17:36 +10:00
pSeries_smp.c [PATCH] ppc64: create firmware_has_feature() 2005-08-29 10:53:35 +10:00
pSeries_vio.c [PATCH] Create vio_bus_ops 2005-08-30 13:23:47 +10:00
ptrace32.c [PATCH] convert that currently tests _NSIG directly to use valid_signal() 2005-05-01 08:59:14 -07:00
ptrace.c [PATCH] ppc64: fix seccomp with 32-bit userland 2005-06-24 00:05:18 -07:00
ras.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
rtas_flash.c [PATCH] ppc64: trivial user annotations 2005-04-26 11:26:53 -07:00
rtas_pci.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
rtas-proc.c [PATCH] ppc64: pSeries_progress -> rtas_progress 2005-06-23 09:43:28 +10:00
rtas.c [PATCH] correct printing to operator panel 2005-06-23 16:09:41 +10:00
rtasd.c [PATCH] ppc64: replace schedule_timeout() with msleep_interruptible() 2005-09-05 00:06:01 -07:00
rtc.c [PATCH] ppc64: replace schedule_timeout() with msleep_interruptible() 2005-09-05 00:06:01 -07:00
scanlog.c [PATCH] ppc64: replace schedule_timeout() with msleep_interruptible() 2005-09-05 00:06:01 -07:00
semaphore.c
setup.c [SERIAL] Use an enum for serial8250 platform device IDs 2005-09-08 16:04:41 +01:00
signal32.c [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
signal.c [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
smp-tbsync.c
smp.c [PATCH] ppc64: dynamically allocate segment tables 2005-07-27 16:25:58 -07:00
spider-pic.c [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
sys_ppc32.c Allow PCI config space syscalls to be used by 64-bit processes. 2005-09-09 23:02:36 +10:00
syscalls.c [PATCH] powerpc: Make check_bugs() static inline 2005-09-09 22:11:35 +10:00
sysfs.c [PATCH] ppc64: add number of PMCs to cputable 2005-09-06 16:09:20 +10:00
time.c [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
traps.c [PATCH] Kprobes: prevent possible race conditions ppc64 changes 2005-09-07 16:58:00 -07:00
u3_iommu.c [PATCH] Separate pci bits out of struct device_node 2005-09-09 22:11:38 +10:00
udbg_16550.c [PATCH] ppc64: Remove old includes 2005-09-06 16:07:37 +10:00
udbg_scc.c [PATCH] ppc64: Remove old includes 2005-09-06 16:07:37 +10:00
udbg.c [PATCH] ppc64: iSeries early printk breakage 2005-09-09 22:11:34 +10:00
vdso.c [PATCH] ppc64: Improve mapping of vDSO 2005-04-16 15:24:35 -07:00
vecemu.c
vector.S
vio.c [PATCH] Make MODULE_DEVICE_TABLE work for vio devices 2005-08-30 13:31:56 +10:00
viopath.c [PATCH] ppc64 iSeries: misc header cleanups 2005-06-21 18:46:28 -07:00
vmlinux.lds.S [PATCH] Kprobes: prevent possible race conditions ppc64 changes 2005-09-07 16:58:00 -07:00
xics.c [PATCH] ppc64: fix for kexec boot issue 2005-08-04 13:00:55 -07:00