ia64 counter part of 99:f15643dab1ca
--
yamahata
# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1184318362 -32400
# Node ID 7cd88e3183ffb449b0bdbd5fbdf1bfe2b501fb9a
# Parent e35c8f3cd28719337def64cae0404e333b840274
ia64 counter part of 99:f15643dab1ca.
PATCHNAME: ia64_counter_part_swiotlb_fix
Signed-off-by: Isaku Yamahata <[EMAIL PROTECTED]>
diff -r e35c8f3cd287 -r 7cd88e3183ff arch/ia64/xen/swiotlb.c
--- a/arch/ia64/xen/swiotlb.c Wed Jul 11 17:19:09 2007 +0900
+++ b/arch/ia64/xen/swiotlb.c Fri Jul 13 18:19:22 2007 +0900
@@ -336,6 +336,7 @@ map_single(struct device *hwdev, char *b
unsigned long flags;
char *dma_addr;
unsigned int nslots, stride, index, wrap;
+ char *slot_buf;
int i;
/*
@@ -402,7 +403,11 @@ map_single(struct device *hwdev, char *b
* This is needed when we sync the memory. Then we sync the buffer if
* needed.
*/
- io_tlb_orig_addr[index] = buffer;
+ slot_buf = buffer;
+ for (i = 0; i < nslots; i++) {
+ io_tlb_orig_addr[index + i] = slot_buf;
+ slot_buf += 1 << IO_TLB_SHIFT;
+ }
if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
memcpy(dma_addr, buffer, size);
_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel