Skip to content

Commit

Permalink
x86: use sg_phys in x86_64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 19, 2008
1 parent e4dcdd6 commit 30db2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/pci-nommu_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 30db2cb

Please sign in to comment.