From: Michael Ellerman <hidden> Date: 2007-12-05 07:20:57
Store a pointer to the direct_dma_offset in each device's dma_data
in the case where we're using the direct DMA ops.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/platforms/cell/iommu.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
@@ -495,9 +495,10 @@ static void cell_dma_dev_setup(struct device *dev)structcbe_iommu*iommu;structdev_archdata*archdata=&dev->archdata;-/* If we run without iommu, no need to do anything */-if(get_pci_dma_ops()==&dma_direct_ops)+if(get_pci_dma_ops()==&dma_direct_ops){+archdata->dma_data=&dma_direct_offset;return;+}/* Current implementation uses the first window available in that*node'siommu.We-might-dosomethingsmarterlaterthoughitmay
From: Michael Ellerman <hidden> Date: 2007-12-05 07:20:58
Celleb always uses dma_direct_ops, and sets dma_direct_offset, so it too
should set dma_data to dma_direct_offset.
Currently there's no pci_dma_dev_setup() routine for Celleb so add one.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/platforms/celleb/iommu.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
On Wednesday 05 December 2007, Michael Ellerman wrote:
Celleb always uses dma_direct_ops, and sets dma_direct_offset, so it too
should set dma_data to dma_direct_offset.
Currently there's no pci_dma_dev_setup() routine for Celleb so add one.
Signed-off-by: Michael Ellerman <redacted>
From: Michael Ellerman <hidden> Date: 2007-12-05 07:21:00
Now that all platforms using dma_direct_offset setup the archdata.dma_data
correctly, we can change the dma_direct_ops to retrieve the offset from
the dma_data, rather than directly from the global.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/kernel/dma_64.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
On Wednesday 05 December 2007, Michael Ellerman wrote:
Now that all platforms using dma_direct_offset setup the archdata.dma_data
correctly, we can change the dma_direct_ops to retrieve the offset from
the dma_data, rather than directly from the global.
Signed-off-by: Michael Ellerman <redacted>
From: Michael Ellerman <hidden> Date: 2007-12-05 07:21:01
Rather than using the global variable, have cell use its own variable to
store the direct DMA offset.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/platforms/cell/iommu.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
@@ -654,7 +656,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*inPCIspace.Weassumethatallbussesusethesamedma
@@ -688,10 +690,10 @@ static int __init cell_iommu_init_disabled(void)return-ENODEV;}-dma_direct_offset+=base;+cell_dma_direct_offset+=base;printk("iommu: disabled, direct DMA offset is 0x%lx\n",-dma_direct_offset);+cell_dma_direct_offset);return0;}
From: Michael Ellerman <hidden> Date: 2007-12-05 07:21:03
Rather than using the global variable, have celleb use its own variable to
store the direct DMA offset.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/platforms/celleb/iommu.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
From: Michael Ellerman <hidden> Date: 2007-12-05 07:21:05
We no longer need the global dma_direct_offset, update the comment to
reflect the new reality.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/kernel/dma_64.c | 7 ++++---
include/asm-powerpc/dma-mapping.h | 2 --
2 files changed, 4 insertions(+), 5 deletions(-)
From: Michael Ellerman <hidden> Date: 2007-12-05 07:21:07
Since commit c80d9133e99de1af607314107910a2a1645efb17 (Make direct DMA use
node local allocations) went in this comment makes no sense.
Signed-off-by: Michael Ellerman <redacted>
---
arch/powerpc/kernel/dma_64.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
@@ -137,7 +137,6 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,void*ret;intnode=dev->archdata.numa_node;-/* TODO: Maybe use the numa node here too ? */page=alloc_pages_node(node,flag,get_order(size));if(page==NULL)returnNULL;
On Wednesday 05 December 2007, Michael Ellerman wrote:
Since commit c80d9133e99de1af607314107910a2a1645efb17 (Make direct DMA use
node local allocations) went in this comment makes no sense.
Signed-off-by: Michael Ellerman <redacted>
On Wednesday 05 December 2007, Michael Ellerman wrote:
Store a pointer to the direct_dma_offset in each device's dma_data
in the case where we're using the direct DMA ops.
Signed-off-by: Michael Ellerman <redacted>