From: Olof Johansson 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 Acked-by: Paul Mackerras Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/pSeries_iommu.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff -puN arch/ppc64/kernel/pSeries_iommu.c~ppc64-iommu-avoid-isa-io-space-on-power3 arch/ppc64/kernel/pSeries_iommu.c --- 25/arch/ppc64/kernel/pSeries_iommu.c~ppc64-iommu-avoid-isa-io-space-on-power3 Thu Jan 13 16:10:51 2005 +++ 25-akpm/arch/ppc64/kernel/pSeries_iommu.c Thu Jan 13 16:10:51 2005 @@ -327,12 +327,25 @@ static void iommu_bus_setup_pSeries(stru /* 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); _