Commit 63ba1a21 authored by Olof Johansson's avatar Olof Johansson Committed by Linus Torvalds

[PATCH] ppc64: fix iommu cleanup regression

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: default avatarOlof Johansson <olof@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b6dfc3f2
...@@ -293,10 +293,6 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb, ...@@ -293,10 +293,6 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb,
struct iommu_table *tbl, struct iommu_table *tbl,
unsigned int *dma_window) 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; tbl->it_busno = dn->bussubno;
/* TODO: Parse field size properties properly. */ /* TODO: Parse field size properties properly. */
...@@ -385,7 +381,10 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) ...@@ -385,7 +381,10 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus)
break; 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) { if (!pdn->iommu_table) {
/* Bussubno hasn't been copied yet. /* Bussubno hasn't been copied yet.
...@@ -420,10 +419,11 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev) ...@@ -420,10 +419,11 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev)
while (dn && dn->iommu_table == NULL) while (dn && dn->iommu_table == NULL)
dn = dn->parent; dn = dn->parent;
WARN_ON(!dn); if (dn) {
if (dn)
mydn->iommu_table = dn->iommu_table; 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) { } static void iommu_bus_setup_null(struct pci_bus *b) { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment