aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-10-23 03:32:25 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-23 03:49:33 -0400
commit12d4d40e6fd583d32daeac0bc42123b23b7c40b7 (patch)
tree3e411647a51f123be41ee266fdc6ceefa6549bf3 /drivers/pci/intel-iommu.c
parentb61e8f4844fd0767b656bd1f983933cc3d0102f3 (diff)
intel-iommu: fix sg_page()
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index b3d70310af49..0c4ab3b07274 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1962,7 +1962,7 @@ static void intel_free_coherent(struct device *hwdev, size_t size,
1962 free_pages((unsigned long)vaddr, order); 1962 free_pages((unsigned long)vaddr, order);
1963} 1963}
1964 1964
1965#define SG_ENT_VIRT_ADDRESS(sg) (page_address((sg)->page) + (sg)->offset) 1965#define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg)))
1966static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist, 1966static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist,
1967 int nelems, int dir) 1967 int nelems, int dir)
1968{ 1968{
@@ -2010,7 +2010,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
2010 struct scatterlist *sg; 2010 struct scatterlist *sg;
2011 2011
2012 for_each_sg(sglist, sg, nelems, i) { 2012 for_each_sg(sglist, sg, nelems, i) {
2013 BUG_ON(!sg->page); 2013 BUG_ON(!sg_page(sg));
2014 sg->dma_address = virt_to_bus(SG_ENT_VIRT_ADDRESS(sg)); 2014 sg->dma_address = virt_to_bus(SG_ENT_VIRT_ADDRESS(sg));
2015 sg->dma_length = sg->length; 2015 sg->dma_length = sg->length;
2016 } 2016 }