vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc64 / kernel / pci_iommu.c
index 4d99851..dd5ad02 100644 (file)
 #include <asm/iSeries/iSeries_pci.h>
 #endif /* CONFIG_PPC_ISERIES */
 
+/*
+ * We can use ->sysdata directly and avoid the extra work in
+ * pci_device_to_OF_node since ->sysdata will have been initialised
+ * in the iommu init code for all devices.
+ */
+#define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata))
+
 static inline struct iommu_table *devnode_table(struct pci_dev *dev)
 {
        if (!dev)
@@ -54,9 +61,9 @@ static inline struct iommu_table *devnode_table(struct pci_dev *dev)
        return ISERIES_DEVNODE(dev)->iommu_table;
 #endif /* CONFIG_PPC_ISERIES */
 
-#ifdef CONFIG_PPC_PSERIES
+#ifdef CONFIG_PPC_MULTIPLATFORM
        return PCI_GET_DN(dev)->iommu_table;
-#endif /* CONFIG_PPC_PSERIES */
+#endif /* CONFIG_PPC_MULTIPLATFORM */
 }