aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/pci_64.c9
-rw-r--r--arch/powerpc/platforms/cell/iommu.c4
-rw-r--r--arch/powerpc/platforms/celleb/iommu.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 73d509343d5b..db1d40ef7d60 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -61,8 +61,7 @@ void iSeries_pcibios_init(void);
61 61
62LIST_HEAD(hose_list); 62LIST_HEAD(hose_list);
63 63
64struct dma_mapping_ops *pci_dma_ops; 64static struct dma_mapping_ops *pci_dma_ops;
65EXPORT_SYMBOL(pci_dma_ops);
66 65
67int global_phb_number; /* Global phb counter */ 66int global_phb_number; /* Global phb counter */
68 67
@@ -75,6 +74,12 @@ void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
75 pci_dma_ops = dma_ops; 74 pci_dma_ops = dma_ops;
76} 75}
77 76
77struct dma_mapping_ops *get_pci_dma_ops(void)
78{
79 return pci_dma_ops;
80}
81EXPORT_SYMBOL(get_pci_dma_ops);
82
78static void fixup_broken_pcnet32(struct pci_dev* dev) 83static void fixup_broken_pcnet32(struct pci_dev* dev)
79{ 84{
80 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { 85 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index d0e02ea1d538..7c953cc022f6 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -496,7 +496,7 @@ static void cell_dma_dev_setup(struct device *dev)
496 struct dev_archdata *archdata = &dev->archdata; 496 struct dev_archdata *archdata = &dev->archdata;
497 497
498 /* If we run without iommu, no need to do anything */ 498 /* If we run without iommu, no need to do anything */
499 if (pci_dma_ops == &dma_direct_ops) 499 if (get_pci_dma_ops() == &dma_direct_ops)
500 return; 500 return;
501 501
502 /* Current implementation uses the first window available in that 502 /* Current implementation uses the first window available in that
@@ -530,7 +530,7 @@ static int cell_of_bus_notify(struct notifier_block *nb, unsigned long action,
530 return 0; 530 return 0;
531 531
532 /* We use the PCI DMA ops */ 532 /* We use the PCI DMA ops */
533 dev->archdata.dma_ops = pci_dma_ops; 533 dev->archdata.dma_ops = get_pci_dma_ops();
534 534
535 cell_dma_dev_setup(dev); 535 cell_dma_dev_setup(dev);
536 536
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index fecc4ffd475e..e94de6a24622 100644
--- a/arch/powerpc/platforms/celleb/iommu.c
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -80,7 +80,7 @@ static int celleb_of_bus_notify(struct notifier_block *nb,
80 if (action != BUS_NOTIFY_ADD_DEVICE) 80 if (action != BUS_NOTIFY_ADD_DEVICE)
81 return 0; 81 return 0;
82 82
83 dev->archdata.dma_ops = pci_dma_ops; 83 dev->archdata.dma_ops = get_pci_dma_ops();
84 84
85 return 0; 85 return 0;
86} 86}