Thread (14 messages) flat view 14 messages, 2 authors, 2007-12-05
STALE6826d

[PATCH 1/7] Set archdata.dma_data for direct DMA in cell_dma_dev_setup()

From: Michael Ellerman <hidden>
Date: 2007-12-05 07:20:57
Subsystem: cell broadband engine architecture, linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

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(-)
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index faabc3f..2edb1ad 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -495,9 +495,10 @@ static void cell_dma_dev_setup(struct device *dev)
 	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
-- 
1.5.3.7.1.g4e596e
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help