diff options
author | Olof Johansson <olof@austin.ibm.com> | 2005-01-10 17:11:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 17:11:06 -0800 |
commit | 63ba1a213e5b8e77f954632c71d6ca4af0b3a0b4 (patch) | |
tree | 52fc2731a16027478d376197b6156ddeeb9a7205 /arch | |
parent | b6dfc3f2d6cb1a1d0c1ad4506712c1557566b419 (diff) | |
download | history-63ba1a213e5b8e77f954632c71d6ca4af0b3a0b4.tar.gz |
[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: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/pSeries_iommu.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c index 3d625552739ff7..08d8262dbca0dd 100644 --- a/arch/ppc64/kernel/pSeries_iommu.c +++ b/arch/ppc64/kernel/pSeries_iommu.c @@ -293,10 +293,6 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb, 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(struct pci_bus *bus) 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(struct pci_dev *dev) 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) { } |