Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5d67bd5ecd90cc03eb84f709ab83ccc05a37eee
Commit:     f5d67bd5ecd90cc03eb84f709ab83ccc05a37eee
Parent:     35e4a6e26d0c6bc7f32087db61f0fb3666531183
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 16:42:45 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 22:52:54 2008 +1100

    [POWERPC] Have cell use its own dma_direct_offset variable
    
    Rather than using the global variable, have cell use its own variable
    to store the direct DMA offset.
    
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/iommu.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/cell/iommu.c 
b/arch/powerpc/platforms/cell/iommu.c
index 9682b63..7f45d59 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -490,6 +490,8 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)
        return NULL;
 }
 
+static unsigned long cell_dma_direct_offset;
+
 static void cell_dma_dev_setup(struct device *dev)
 {
        struct iommu_window *window;
@@ -497,7 +499,7 @@ static void cell_dma_dev_setup(struct device *dev)
        struct dev_archdata *archdata = &dev->archdata;
 
        if (get_pci_dma_ops() == &dma_direct_ops) {
-               archdata->dma_data = (void *)dma_direct_offset;
+               archdata->dma_data = (void *)cell_dma_direct_offset;
                return;
        }
 
@@ -655,7 +657,7 @@ static int __init cell_iommu_init_disabled(void)
 
        /* If we have no Axon, we set up the spider DMA magic offset */
        if (of_find_node_by_name(NULL, "axon") == NULL)
-               dma_direct_offset = SPIDER_DMA_OFFSET;
+               cell_dma_direct_offset = SPIDER_DMA_OFFSET;
 
        /* Now we need to check to see where the memory is mapped
         * in PCI space. We assume that all busses use the same dma
@@ -689,13 +691,13 @@ static int __init cell_iommu_init_disabled(void)
                return -ENODEV;
        }
 
-       dma_direct_offset += base;
+       cell_dma_direct_offset += base;
 
-       if (dma_direct_offset != 0)
+       if (cell_dma_direct_offset != 0)
                ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
 
        printk("iommu: disabled, direct DMA offset is 0x%lx\n",
-              dma_direct_offset);
+              cell_dma_direct_offset);
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to