WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH 5 of 9] swiotlb: Rename SG_ENT_PHYS_ADDRESS to SG_ENT

To: Ingo Molnar <mingo@xxxxxxx>
Subject: [Xen-devel] [PATCH 5 of 9] swiotlb: Rename SG_ENT_PHYS_ADDRESS to SG_ENT_BUS_ADDRESS
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: 2008年12月22日 10:26:07 -0800
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Becky Bruce <beckyb@xxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
Delivery-date: 2008年12月22日 10:33:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1229970362@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Becky Bruce <beckyb@xxxxxxxxxxxxxxxxxxx>
Also add hwdev argument - some platforms will need this to
calculate an actual bus address.
Signed-off-by: Becky Bruce <beckyb@xxxxxxxxxxxxxxxxxxx>
---
 lib/swiotlb.c | 6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -38,7 +38,7 @@
 #define OFFSET(val,align) ((unsigned long) \
 ( (val) & ( (align) - 1)))
 
-#define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(sg_virt(sg))
+#define SG_ENT_BUS_ADDRESS(hwdev, sg) swiotlb_virt_to_bus(hwdev, sg_virt(sg))
 
 #define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT))
 
@@ -811,7 +811,7 @@
 BUG_ON(dir == DMA_NONE);
 
 for_each_sg(sgl, sg, nelems, i) {
- if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
+ if (sg->dma_address != SG_ENT_BUS_ADDRESS(hwdev, sg))
 unmap_single(hwdev, 
swiotlb_bus_to_virt(sg->dma_address),
 sg->dma_length, dir);
 else if (dir == DMA_FROM_DEVICE)
@@ -844,7 +844,7 @@
 BUG_ON(dir == DMA_NONE);
 
 for_each_sg(sgl, sg, nelems, i) {
- if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
+ if (sg->dma_address != SG_ENT_BUS_ADDRESS(hwdev, sg))
 sync_single(hwdev, swiotlb_bus_to_virt(sg->dma_address),
 sg->dma_length, dir, target);
 else if (dir == DMA_FROM_DEVICE)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH 1 of 9] revert "swiotlb: support bouncing of HighMem pages." , Jeremy Fitzhardinge
Next by Date: [Xen-devel] [PATCH 0 of 9] swiotlb: use phys_addr_t for pages , Jeremy Fitzhardinge
Previous by Thread: [Xen-devel] [PATCH 1 of 9] revert "swiotlb: support bouncing of HighMem pages." , Jeremy Fitzhardinge
Next by Thread: [Xen-devel] [PATCH 3 of 9] swiotlb: add hwdev to swiotlb_phys_to_bus , Jeremy Fitzhardinge
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /