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] [IA64] Fix virt_to_bus()/gnttab_dma_u

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix virt_to_bus()/gnttab_dma_use_page() ordering
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Jun 2007 06:01:03 -0700
Delivery-date: Sat, 16 Jun 2007 05:59:30 -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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1181707347 21600
# Node ID a87acf37aa004a51e6e8dfead05a941ff6ab087c
# Parent  5917bb91bf09a5b3c1ba8c65237cbfb5ac175a86
[IA64] Fix virt_to_bus()/gnttab_dma_use_page() ordering

virt_to_bus() must be called after gnttab_dma_use_page() loop.
Otherwise gnttab unmap_and_replace may happen between them, resulting
in the bus address being wrong.  Thanks Isaku.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 arch/ia64/hp/common/sba_iommu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 5917bb91bf09 -r a87acf37aa00 arch/ia64/hp/common/sba_iommu.c
--- a/arch/ia64/hp/common/sba_iommu.c   Tue Jun 12 20:43:50 2007 -0600
+++ b/arch/ia64/hp/common/sba_iommu.c   Tue Jun 12 22:02:27 2007 -0600
@@ -922,7 +922,7 @@ sba_map_single(struct device *dev, void 
        unsigned long flags;
 #endif
 #ifdef ALLOW_IOV_BYPASS
-       unsigned long pci_addr = virt_to_bus(addr);
+       unsigned long pci_addr;
 #endif
 
 #ifdef CONFIG_XEN
@@ -938,6 +938,7 @@ sba_map_single(struct device *dev, void 
 #endif
 
 #ifdef ALLOW_IOV_BYPASS
+       pci_addr = virt_to_bus(addr);
        ASSERT(to_pci_dev(dev)->dma_mask);
        /*
        ** Check if the PCI device can DMA to ptr... if so, just return ptr

_______________________________________________
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] [IA64] Fix virt_to_bus()/gnttab_dma_use_page() ordering, Xen patchbot-linux-2.6.18-xen <=