Prev: [PATCH] fbcon: deinline large static function get_color()
Next: [PATCH 13/19] swiotlb-xen: Remove io_tlb_overflow usage.
From: Konrad Rzeszutek Wilk on 22 Jun 2010 15:50 Refer to "swiotlb-xen: Make 'xen_swiotlb_[map|unmap]_page' work." for details why we want to use our own address translation mechanism. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com> --- lib/swiotlb-xen.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/swiotlb-xen.c b/lib/swiotlb-xen.c index efafcce..ca6c537 100644 --- a/lib/swiotlb-xen.c +++ b/lib/swiotlb-xen.c @@ -282,11 +282,12 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, enum dma_sync_target target) { - phys_addr_t paddr = dma_to_phys(hwdev, dev_addr); + phys_addr_t paddr = xen_bus_to_phys(hwdev, dev_addr); BUG_ON(dir == DMA_NONE); - if (is_xen_swiotlb_buffer(paddr)) { + /* NOTE: We use dev_addr here, not paddr! */ + if (is_xen_swiotlb_buffer(dev_addr)) { swiotlb_tbl_sync_single(hwdev, phys_to_virt(paddr), size, dir, target); return; -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |