From ce8f5daafeb008eb6d9994377e598da23678ecf3 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 6 Dec 2007 13:39:19 +1100 Subject: [PATCH] --- yaml --- r: 81006 b: refs/heads/master c: 68d315f5975c05595af52e3b758b5b6ebae1a266 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/iommu.c | 8 +++----- trunk/arch/powerpc/platforms/pseries/iommu.c | 2 +- trunk/include/asm-powerpc/iommu.h | 3 +-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index f9731ab10447..26688b504991 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d9dc4b473f7224cc1798c96d5dba84b69212163 +refs/heads/master: 68d315f5975c05595af52e3b758b5b6ebae1a266 diff --git a/trunk/arch/powerpc/kernel/iommu.c b/trunk/arch/powerpc/kernel/iommu.c index 2d0c9ef555e9..47c3fe55242f 100644 --- a/trunk/arch/powerpc/kernel/iommu.c +++ b/trunk/arch/powerpc/kernel/iommu.c @@ -526,16 +526,14 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid) return tbl; } -void iommu_free_table(struct device_node *dn) +void iommu_free_table(struct iommu_table *tbl, const char *node_name) { - struct pci_dn *pdn = dn->data; - struct iommu_table *tbl = pdn->iommu_table; unsigned long bitmap_sz, i; unsigned int order; if (!tbl || !tbl->it_map) { printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, - dn->full_name); + node_name); return; } @@ -544,7 +542,7 @@ void iommu_free_table(struct device_node *dn) for (i = 0; i < (tbl->it_size/64); i++) { if (tbl->it_map[i] != 0) { printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", - __FUNCTION__, dn->full_name); + __FUNCTION__, node_name); break; } } diff --git a/trunk/arch/powerpc/platforms/pseries/iommu.c b/trunk/arch/powerpc/platforms/pseries/iommu.c index be17d2395072..d4e9d851bb68 100644 --- a/trunk/arch/powerpc/platforms/pseries/iommu.c +++ b/trunk/arch/powerpc/platforms/pseries/iommu.c @@ -556,7 +556,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti case PSERIES_RECONFIG_REMOVE: if (pci && pci->iommu_table && of_get_property(np, "ibm,dma-window", NULL)) - iommu_free_table(np); + iommu_free_table(pci->iommu_table, np->full_name); break; default: err = NOTIFY_DONE; diff --git a/trunk/include/asm-powerpc/iommu.h b/trunk/include/asm-powerpc/iommu.h index 4a82fdccee92..7a3cef785abd 100644 --- a/trunk/include/asm-powerpc/iommu.h +++ b/trunk/include/asm-powerpc/iommu.h @@ -69,10 +69,9 @@ struct iommu_table { }; struct scatterlist; -struct device_node; /* Frees table for an individual device node */ -extern void iommu_free_table(struct device_node *dn); +extern void iommu_free_table(struct iommu_table *tbl, const char *node_name); /* Initializes an iommu_table based in values set in the passed-in * structure