[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1277235772-26757-12-git-send-email-konrad.wilk@oracle.com>
Date: Tue, 22 Jun 2010 15:42:44 -0400
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: linux-kernel@...r.kernel.org, fujita.tomonori@....ntt.co.jp,
iommu@...ts.linux-foundation.org, albert_herranz@...oo.es,
x86@...nel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH 11/19] swiotlb-xen: Make 'xen_swiotlb_sync_single' work.
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@...cle.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists