diff options
author | Olof Johansson <olof@austin.ibm.com> | 2005-01-14 23:21:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:21:58 -0800 |
commit | a106224296d6fa7f0a450dfd5b74dd46a45a604d (patch) | |
tree | 6fffbe94e22fe5b169097968c6ab9e4e11690b6a /arch | |
parent | 7d033a996cd7cfefd8e9abbb0b61db85bb71e806 (diff) | |
download | history-a106224296d6fa7f0a450dfd5b74dd46a45a604d.tar.gz |
[PATCH] ppc64: iommu: avoid ISA io space on POWER3
On some systems, the first PCI bus has a ISA I/O hole at the first 16MB.
We can't use this space for DMA addresses on the bus.
On Python-based machines, we'll skip the first 256MB on buses that have the
hole, just as we do on later systems. This means that the first bus will
have 768MB of DMA space shared between the devices on it.
Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/pSeries_iommu.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c index 08d8262dbca0dd..382bce676a71fc 100644 --- a/arch/ppc64/kernel/pSeries_iommu.c +++ b/arch/ppc64/kernel/pSeries_iommu.c @@ -327,12 +327,25 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) /* Root bus */ if (is_python(dn)) { struct iommu_table *tbl; + unsigned int *iohole; DBG("Python root bus %s\n", bus->name); - /* 1GB window by default */ - dn->phb->dma_window_size = 1 << 30; - dn->phb->dma_window_base_cur = 0; + iohole = (unsigned int *)get_property(dn, "io-hole", 0); + + if (iohole) { + /* On first bus we need to leave room for the + * ISA address space. Just skip the first 256MB + * alltogether. This leaves 768MB for the window. + */ + DBG("PHB has io-hole, reserving 256MB\n"); + dn->phb->dma_window_size = 3 << 28; + dn->phb->dma_window_base_cur = 1 << 28; + } else { + /* 1GB window by default */ + dn->phb->dma_window_size = 1 << 30; + dn->phb->dma_window_base_cur = 0; + } tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); |