[PATCH] suggested kexec API changes
Anton Blanchard
anton at samba.org
Sun Nov 14 11:16:16 EST 2004
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 at samba.org>
diff -puN arch/ppc64/kernel/pSeries_iommu.c~iommu_real_addr arch/ppc64/kernel/pSeries_iommu.c
--- gr_base/arch/ppc64/kernel/pSeries_iommu.c~iommu_real_addr 2004-11-12 04:51:30.405991684 -0600
+++ gr_base-anton/arch/ppc64/kernel/pSeries_iommu.c 2004-11-12 04:51:30.422988913 -0600
@@ -317,19 +317,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;
@@ -353,7 +350,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;
diff -puN arch/ppc64/kernel/prom_init.c~iommu_real_addr arch/ppc64/kernel/prom_init.c
--- gr_base/arch/ppc64/kernel/prom_init.c~iommu_real_addr 2004-11-12 04:51:30.411990706 -0600
+++ gr_base-anton/arch/ppc64/kernel/prom_init.c 2004-11-12 04:51:30.426988260 -0600
@@ -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));
_
More information about the Linuxppc64-dev
mailing list