[POWERPC 04/18] Set archdata.dma_data for direct DMA in cell_dma_dev_setup()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Dec 19 06:48:34 EST 2007
On Tue, 2007-12-18 at 18:48 +0100, arnd at arndb.de wrote:
> plain text document attachment
> (0014-Set-archdata.dma_data-for-direct-DMA-in-cell_dma_dev.patch)
> 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 <michael at ellerman.id.au>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Ack.
> ---
> arch/powerpc/platforms/cell/iommu.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> Index: linux-2.6-new/arch/powerpc/platforms/cell/iommu.c
> ===================================================================
> --- linux-2.6-new.orig/arch/powerpc/platforms/cell/iommu.c
> +++ linux-2.6-new/arch/powerpc/platforms/cell/iommu.c
> @@ -496,9 +496,10 @@ static void cell_dma_dev_setup(struct de
> struct cbe_iommu *iommu;
> struct dev_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's iommu. We -might- do something smarter later though it may
>
More information about the Linuxppc-dev
mailing list