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 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] swiotlb: Handle sync invocations on s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] swiotlb: Handle sync invocations on subregions of a mapped region.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jul 2007 04:34:08 -0700
Delivery-date: Tue, 10 Jul 2007 04:32:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184006464 -3600
# Node ID f15643dab1ca40ff3f2ca7eed5196bc74703422a
# Parent  d9af7736dee4899528c8d9c2cbdb57f03d5475ca
swiotlb: Handle sync invocations on subregions of a mapped region.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 arch/i386/kernel/swiotlb.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -r d9af7736dee4 -r f15643dab1ca arch/i386/kernel/swiotlb.c
--- a/arch/i386/kernel/swiotlb.c        Mon Jul 09 18:16:05 2007 +0100
+++ b/arch/i386/kernel/swiotlb.c        Mon Jul 09 19:41:04 2007 +0100
@@ -304,6 +304,7 @@ map_single(struct device *hwdev, struct 
        unsigned long flags;
        char *dma_addr;
        unsigned int nslots, stride, index, wrap;
+       struct phys_addr slot_buf;
        int i;
 
        /*
@@ -375,7 +376,15 @@ map_single(struct device *hwdev, struct 
         * 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.offset += 1 << IO_TLB_SHIFT;
+               if (slot_buf.offset > PAGE_SIZE) {
+                       slot_buf.page++;
+                       slot_buf.offset -= PAGE_SIZE;
+               }
+       }
        if ((dir == DMA_TO_DEVICE) || (dir == DMA_BIDIRECTIONAL))
                __sync_single(buffer, dma_addr, size, DMA_TO_DEVICE);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] swiotlb: Handle sync invocations on subregions of a mapped region., Xen patchbot-linux-2.6.18-xen <=