
From: Olof Johansson <olof@austin.ibm.com>

In the recent IOMMU cleanup, the new LPAR code assumes that all PHBs must
have a dma window assigned to it.  On some machines we don't have a window
assinged unless there's an adapter in the slot.

In other words, a PHB without a ibm,dma-window property is not a bug and
must be tolerated.  This patch fixes that, and also removes a redundant
check for the dma-window being defined.

Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ppc64/kernel/pSeries_iommu.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff -puN arch/ppc64/kernel/pSeries_iommu.c~ppc64-fix-iommu-cleanup-regression arch/ppc64/kernel/pSeries_iommu.c
--- 25/arch/ppc64/kernel/pSeries_iommu.c~ppc64-fix-iommu-cleanup-regression	2005-01-10 17:29:23.638293352 -0800
+++ 25-akpm/arch/ppc64/kernel/pSeries_iommu.c	2005-01-10 17:29:23.642292744 -0800
@@ -293,10 +293,6 @@ static void iommu_table_setparms_lpar(st
 				      struct iommu_table *tbl,
 				      unsigned int *dma_window)
 {
-	if (!dma_window)
-		panic("iommu_table_setparms_lpar: device %s has no"
-		      " ibm,dma-window property!\n", dn->full_name);
-
 	tbl->it_busno  = dn->bussubno;
 
 	/* TODO: Parse field size properties properly. */
@@ -385,7 +381,10 @@ static void iommu_bus_setup_pSeriesLP(st
 			break;
 	}
 
-	WARN_ON(dma_window == NULL);
+	if (dma_window == NULL) {
+		DBG("iommu_bus_setup_pSeriesLP: bus %s seems to have no ibm,dma-window property\n", dn->full_name);
+		return;
+	}
 
 	if (!pdn->iommu_table) {
 		/* Bussubno hasn't been copied yet.
@@ -420,10 +419,11 @@ static void iommu_dev_setup_pSeries(stru
 	while (dn && dn->iommu_table == NULL)
 		dn = dn->parent;
 
-	WARN_ON(!dn);
-
-	if (dn)
+	if (dn) {
 		mydn->iommu_table = dn->iommu_table;
+	} else {
+		DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, dev->pretty_name);
+	}
 }
 
 static void iommu_bus_setup_null(struct pci_bus *b) { }
_
