aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-nommu_64.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-07-24 06:39:27 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-16 05:26:02 -0400
commitb922f53bd02f2017a3a47f29abaee18f91fb8fb4 (patch)
tree8723272239aa8a88322783ca9278cc3f9765c28b /arch/x86/kernel/pci-nommu_64.c
parent8b87d9f48a2f0e44fac57aca344d407df39a9901 (diff)
x86-64: update nommu to sg helpers
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch/x86/kernel/pci-nommu_64.c')
-rw-r--r--arch/x86/kernel/pci-nommu_64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-nommu_64.c b/arch/x86/kernel/pci-nommu_64.c
index 2a34c6c025a9..e85d4360360c 100644
--- a/arch/x86/kernel/pci-nommu_64.c
+++ b/arch/x86/kernel/pci-nommu_64.c
@@ -5,6 +5,7 @@
5#include <linux/pci.h> 5#include <linux/pci.h>
6#include <linux/string.h> 6#include <linux/string.h>
7#include <linux/dma-mapping.h> 7#include <linux/dma-mapping.h>
8#include <linux/scatterlist.h>
8 9
9#include <asm/iommu.h> 10#include <asm/iommu.h>
10#include <asm/processor.h> 11#include <asm/processor.h>
@@ -57,10 +58,10 @@ static void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
57static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, 58static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
58 int nents, int direction) 59 int nents, int direction)
59{ 60{
61 struct scatterlist *s;
60 int i; 62 int i;
61 63
62 for (i = 0; i < nents; i++ ) { 64 for_each_sg(sg, s, nents, i) {
63 struct scatterlist *s = &sg[i];
64 BUG_ON(!s->page); 65 BUG_ON(!s->page);
65 s->dma_address = virt_to_bus(page_address(s->page) +s->offset); 66 s->dma_address = virt_to_bus(page_address(s->page) +s->offset);
66 if (!check_addr("map_sg", hwdev, s->dma_address, s->length)) 67 if (!check_addr("map_sg", hwdev, s->dma_address, s->length))