[RFC PATCH 05/11] ppc: do not search for dma-window property on dlpar remove

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nishanth Aravamudan
Date: Friday, October 8, 2010 - 10:33 am

The iommu_table pointer in the pci auxiliary struct of device_node has
not been used by the iommu ops since the dma refactor of
12d04eef927bf61328af2c7cbe756c96f98ac3bf, however this code still uses
it to find tables for dlpar. By only setting the PCI_DN iommu_table
pointer on nodes with dma window properties, we will be able to quickly
find the node for later checks, and can remove the table without looking
for the the dma window property on dlpar remove.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
 arch/powerpc/platforms/pseries/iommu.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9184db3..8ab32da 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -455,9 +455,6 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
 		ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
 		pr_debug("  created table: %p\n", ppci->iommu_table);
 	}
-
-	if (pdn != dn)
-		PCI_DN(dn)->iommu_table = ppci->iommu_table;
 }
 
 
@@ -571,8 +568,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
 
 	switch (action) {
 	case PSERIES_RECONFIG_REMOVE:
-		if (pci && pci->iommu_table &&
-		    of_get_property(np, "ibm,dma-window", NULL))
+		if (pci && pci->iommu_table)
 			iommu_free_table(pci->iommu_table, np->full_name);
 		break;
 	default:
-- 
1.7.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 00/11] ppc: enable dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 01/11] macio: ensure all dma routines get copie ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 03/11] ppc: Create ops to choose between direct ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 04/11] ppc: add memory_hotplug_max, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 05/11] ppc: do not search for dma-window proper ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 06/11] ppc: checking for pdn-&gt;parent is redundant, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 07/11] ppc/iommu: do not need to check for dma_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 08/11] ppc/iommu: remove unneeded pci_dma_bus_s ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 09/11] ppc/iommu: pass phb only to iommu_table_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 10/11] ppc/iommu: add routines to pseries iommu ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 11/11] ppc: add dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
Re: [RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Benjamin Herrenschmidt, (Fri Oct 8, 4:38 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:43 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:44 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Sun Oct 10, 4:41 pm)