[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] swiotlb: clean up. avoid unnecessary address conversion



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1183664181 21600
# Node ID 6e16fa7e3f2088b102939141232c13a8da12317e
# Parent  52ec41fa9cd152107da8f5d1ce60b6019339e4b0
[IA64] swiotlb: clean up. avoid unnecessary address conversion

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/xen/swiotlb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 52ec41fa9cd1 -r 6e16fa7e3f20 arch/ia64/xen/swiotlb.c
--- a/arch/ia64/xen/swiotlb.c   Thu Jul 05 13:35:01 2007 -0600
+++ b/arch/ia64/xen/swiotlb.c   Thu Jul 05 13:36:21 2007 -0600
@@ -676,7 +676,7 @@ swiotlb_unmap_single(struct device *hwde
        if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
                unmap_single(hwdev, dma_addr, size, dir);
        else {
-               gnttab_dma_unmap_page(dev_addr);
+               __gnttab_dma_unmap_page(virt_to_page(dma_addr));
                if (dir == DMA_FROM_DEVICE)
                        mark_clean(dma_addr, size);
        }
@@ -783,7 +783,7 @@ swiotlb_map_sg(struct device *hwdev, str
                dev_addr = gnttab_dma_map_virt(addr);
                if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
                        void *map;
-                       gnttab_dma_unmap_page(dev_addr);
+                       __gnttab_dma_unmap_page(sg->page);
                        map = map_single(hwdev, addr, sg->length, dir);
                        sg->dma_address = virt_to_bus(map);
                        if (!map) {
@@ -817,7 +817,7 @@ swiotlb_unmap_sg(struct device *hwdev, s
                if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
                        unmap_single(hwdev, (void *) 
bus_to_virt(sg->dma_address), sg->dma_length, dir);
                else {
-                       gnttab_dma_unmap_page(sg->dma_address);
+                       __gnttab_dma_unmap_page(sg->page);
                        if (dir == DMA_FROM_DEVICE)
                                mark_clean(SG_ENT_VIRT_ADDRESS(sg),
                                           sg->dma_length);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.