X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Fpci_iommu.c;h=dd5ad02d7e08dd0baa8b084a88988ed86ba53e44;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=4d99851fe815190ed9767de66ec208de836cde43;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c index 4d99851fe..dd5ad02d7 100644 --- a/arch/ppc64/kernel/pci_iommu.c +++ b/arch/ppc64/kernel/pci_iommu.c @@ -43,6 +43,13 @@ #include #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 */ }