aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-gart_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/pci-gart_64.c')
-rw-r--r--arch/x86/kernel/pci-gart_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 5cdfab65e93f..c56e9ee64964 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -302,7 +302,7 @@ static int dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg,
302#endif 302#endif
303 303
304 for_each_sg(sg, s, nents, i) { 304 for_each_sg(sg, s, nents, i) {
305 unsigned long addr = page_to_phys(s->page) + s->offset; 305 unsigned long addr = sg_phys(s);
306 if (nonforced_iommu(dev, addr, s->length)) { 306 if (nonforced_iommu(dev, addr, s->length)) {
307 addr = dma_map_area(dev, addr, s->length, dir); 307 addr = dma_map_area(dev, addr, s->length, dir);
308 if (addr == bad_dma_address) { 308 if (addr == bad_dma_address) {
@@ -397,7 +397,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,
397 start_sg = sgmap = sg; 397 start_sg = sgmap = sg;
398 ps = NULL; /* shut up gcc */ 398 ps = NULL; /* shut up gcc */
399 for_each_sg(sg, s, nents, i) { 399 for_each_sg(sg, s, nents, i) {
400 dma_addr_t addr = page_to_phys(s->page) + s->offset; 400 dma_addr_t addr = sg_phys(s);
401 s->dma_address = addr; 401 s->dma_address = addr;
402 BUG_ON(s->length == 0); 402 BUG_ON(s->length == 0);
403 403