]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use sg_phys in x86_64
authorGlauber Costa <gcosta@redhat.com>
Tue, 8 Apr 2008 16:20:47 +0000 (13:20 -0300)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:19:57 +0000 (19:19 +0200)
To make the code usable in i386, where we have high memory mappings,
we drop te virt_to_bus(sg_virt()) construction in favour of sg_phys.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/pci-nommu_64.c

index 1da9cf9be3aa08947ef4ac9852ec983e2582a4b5..c6901e7517709b61a26dcda239b1b8ac8970e00a 100644 (file)
@@ -60,7 +60,7 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
 
        for_each_sg(sg, s, nents, i) {
                BUG_ON(!sg_page(s));
-               s->dma_address = virt_to_bus(sg_virt(s));
+               s->dma_address = sg_phys(s);
                if (!check_addr("map_sg", hwdev, s->dma_address, s->length))
                        return 0;
                s->dma_length = s->length;