diff options
Diffstat (limited to 'arch/sparc64/kernel/pci_sun4v.c')
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index fe46ace3e59f..8c4875bdb4a8 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -365,8 +365,7 @@ static void dma_4v_unmap_single(struct device *dev, dma_addr_t bus_addr, | |||
365 | spin_unlock_irqrestore(&iommu->lock, flags); | 365 | spin_unlock_irqrestore(&iommu->lock, flags); |
366 | } | 366 | } |
367 | 367 | ||
368 | #define SG_ENT_PHYS_ADDRESS(SG) \ | 368 | #define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG)))) |
369 | (__pa(page_address((SG)->page)) + (SG)->offset) | ||
370 | 369 | ||
371 | static long fill_sg(long entry, struct device *dev, | 370 | static long fill_sg(long entry, struct device *dev, |
372 | struct scatterlist *sg, | 371 | struct scatterlist *sg, |
@@ -477,9 +476,7 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, | |||
477 | /* Fast path single entry scatterlists. */ | 476 | /* Fast path single entry scatterlists. */ |
478 | if (nelems == 1) { | 477 | if (nelems == 1) { |
479 | sglist->dma_address = | 478 | sglist->dma_address = |
480 | dma_4v_map_single(dev, | 479 | dma_4v_map_single(dev, sg_virt(sglist), |
481 | (page_address(sglist->page) + | ||
482 | sglist->offset), | ||
483 | sglist->length, direction); | 480 | sglist->length, direction); |
484 | if (unlikely(sglist->dma_address == DMA_ERROR_CODE)) | 481 | if (unlikely(sglist->dma_address == DMA_ERROR_CODE)) |
485 | return 0; | 482 | return 0; |