]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ppc64: linux,tce* changes
authorAnton Blanchard <anton@samba.org>
Thu, 25 Nov 2004 07:59:08 +0000 (23:59 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 25 Nov 2004 07:59:08 +0000 (23:59 -0800)
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 <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/kernel/pSeries_iommu.c
arch/ppc64/kernel/prom_init.c

index 928e7d18ae652a3b0999c8e0158377f42638c159..2946121eb716fa7eeb607aefb5b5a8fdde5444eb 100644 (file)
@@ -321,19 +321,16 @@ static void iommu_table_setparms(struct pci_controller *phb,
 
        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 pci_controller *phb,
        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;
index fd4839e805dd9393471ecb2aaf441d57fa466027..dd809974a0105a2a3a6bd138f087deb6ea97a307 100644 (file)
@@ -760,7 +760,7 @@ static void __init prom_initialize_tce_table(void)
        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_table(void)
                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));