summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/iommu.c
diff options
context:
space:
mode:
authorStephen Rothwell2006-05-19 08:48:47 +0200
committerPaul Mackerras2006-05-24 08:08:56 +0200
commit96ff6afaf1c2fdd118139095dea66c0910379780 (patch)
tree5364530523d40789b549edc66e02e47b04932c9a /arch/powerpc/platforms/iseries/iommu.c
parent[PATCH] powerpc: move iSeries PCI devices to the device tree (diff)
downloadkernel-qcow2-linux-96ff6afaf1c2fdd118139095dea66c0910379780.tar.gz
kernel-qcow2-linux-96ff6afaf1c2fdd118139095dea66c0910379780.tar.xz
kernel-qcow2-linux-96ff6afaf1c2fdd118139095dea66c0910379780.zip
[PATCH] powerpc: remove iSeries_Global_Device_List
We can now scan the list of device nodes instead. This also allows us to remove the Device_list member of struct pci_dn. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries/iommu.c')
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 3ac22065c424..75a5a1e8abb8 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -32,13 +32,11 @@
#include <asm/tce.h>
#include <asm/machdep.h>
#include <asm/abs_addr.h>
+#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/iommu.h>
-extern struct list_head iSeries_Global_Device_List;
-
-
static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
unsigned long uaddr, enum dma_data_direction direction)
{
@@ -140,10 +138,15 @@ void iommu_table_getparms_iSeries(unsigned long busno,
*/
static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
{
- struct pci_dn *pdn;
+ struct device_node *node;
+
+ for (node = NULL; (node = of_find_all_nodes(node)); ) {
+ struct pci_dn *pdn = PCI_DN(node);
+ struct iommu_table *it;
- list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) {
- struct iommu_table *it = pdn->iommu_table;
+ if (pdn == NULL)
+ continue;
+ it = pdn->iommu_table;
if ((it != NULL) &&
(it->it_type == TCE_PCI) &&
(it->it_offset == tbl->it_offset) &&