From: Anton Blanchard Remove linux,has-tce-table since we can just look for linux,tce-base and linux,tce-size. Make linux,tce-base store real addresses instead of virtual ones, the wrapper may not know the translation the kernel will use. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/pSeries_iommu.c | 14 +++++--------- 25-akpm/arch/ppc64/kernel/prom_init.c | 7 ++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff -puN arch/ppc64/kernel/prom_init.c~ppc64-linuxtce-changes arch/ppc64/kernel/prom_init.c --- 25/arch/ppc64/kernel/prom_init.c~ppc64-linuxtce-changes Fri Nov 19 14:29:28 2004 +++ 25-akpm/arch/ppc64/kernel/prom_init.c Fri Nov 19 14:29:28 2004 @@ -760,7 +760,7 @@ static void __init prom_initialize_tce_t unsigned long offset = reloc_offset(); char compatible[64], type[64], model[64]; char *path = RELOC(prom_scratch); - u64 base, vbase, align; + u64 base, align; u32 minalign, minsize; u64 tce_entry, *tce_entryp; u64 local_alloc_top, local_alloc_bottom; @@ -832,12 +832,9 @@ static void __init prom_initialize_tce_t if (base < local_alloc_bottom) local_alloc_bottom = base; - vbase = (unsigned long)abs_to_virt(base); - /* Save away the TCE table attributes for later use. */ - prom_setprop(node, "linux,tce-base", &vbase, sizeof(vbase)); + prom_setprop(node, "linux,tce-base", &base, sizeof(base)); prom_setprop(node, "linux,tce-size", &minsize, sizeof(minsize)); - prom_setprop(node, "linux,has-tce-table", NULL, 0); /* It seems OF doesn't null-terminate the path :-( */ memset(path, 0, sizeof(path)); diff -puN arch/ppc64/kernel/pSeries_iommu.c~ppc64-linuxtce-changes arch/ppc64/kernel/pSeries_iommu.c --- 25/arch/ppc64/kernel/pSeries_iommu.c~ppc64-linuxtce-changes Fri Nov 19 14:29:28 2004 +++ 25-akpm/arch/ppc64/kernel/pSeries_iommu.c Fri Nov 19 14:29:28 2004 @@ -321,19 +321,16 @@ static void iommu_table_setparms(struct node = (struct device_node *)phb->arch_data; - if (get_property(node, "linux,has-tce-table", NULL) == NULL) { - printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has no tce table !\n", - dn->full_name); - return; - } basep = (unsigned long *)get_property(node, "linux,tce-base", NULL); sizep = (unsigned int *)get_property(node, "linux,tce-size", NULL); if (basep == NULL || sizep == NULL) { - printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has missing tce" - " entries !\n", dn->full_name); + printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " + "missing tce entries !\n", dn->full_name); return; } - memset((void *)(*basep), 0, *sizep); + + tbl->it_base = (unsigned long)__va(*basep); + memset((void *)tbl->it_base, 0, *sizep); tbl->it_busno = phb->bus->number; @@ -357,7 +354,6 @@ static void iommu_table_setparms(struct if (phb->dma_window_base_cur > (1 << 19)) panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); - tbl->it_base = *basep; tbl->it_index = 0; tbl->it_entrysize = sizeof(union tce_entry); tbl->it_blocksize = 16; _