swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 21 Nov 2014 16:56:12 +0000 (16:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2015 14:59:00 +0000 (06:59 -0800)
commit 2c3fc8d26dd09b9d7069687eead849ee81c78e46 upstream.

Need to pass the pointer within the swiotlb internal buffer to the
swiotlb library, that in the case of xen_unmap_single is dev_addr, not
paddr.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/swiotlb-xen.c

index 1d94316f0ea46616ceda930896af210d7ad68284..301b08496478b958ac889853814e4638fe32569a 100644 (file)
@@ -390,7 +390,7 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
 
        /* NOTE: We use dev_addr here, not paddr! */
        if (is_xen_swiotlb_buffer(dev_addr)) {
-               swiotlb_tbl_unmap_single(hwdev, paddr, size, dir);
+               swiotlb_tbl_unmap_single(hwdev, dev_addr, size, dir);
                return;
        }