[POWERPC] Refactor 64 bits DMA operations
This patch completely refactors DMA operations for 64 bits powerpc. 32 bits is untouched for now. We use the new dev_archdata structure to add the dma operations pointer and associated data to struct device. While at it, we also add the OF node pointer and numa node. In the future, we might want to look into merging that with pci_dn as well. The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced by a set of generic iommu and direct DMA ops (non PCI specific) that can be used by bus types. The toplevel implementation is now inline. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
7c719871ff
commit
12d04eef92
@@ -258,9 +258,9 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
|
||||
spin_unlock_irqrestore(&(tbl->it_lock), flags);
|
||||
}
|
||||
|
||||
int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
||||
struct scatterlist *sglist, int nelems,
|
||||
unsigned long mask, enum dma_data_direction direction)
|
||||
int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
||||
int nelems, unsigned long mask,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
dma_addr_t dma_next = 0, dma_addr;
|
||||
unsigned long flags;
|
||||
|
Reference in New Issue
Block a user