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-ia64-devel

[Xen-ia64-devel] [PATCH] Re-add parens lost when paravirtualized

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [PATCH] Re-add parens lost when paravirtualized
From: Aron Griffis <aron@xxxxxx>
Date: Tue, 06 Nov 2007 08:49:24 -0500
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 06 Nov 2007 05:50:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Aron Griffis <aron@xxxxxx>
# Date 1194356920 18000
# Node ID 303be5b19de1cc64f134f16281ccdef68ab3cc81
# Parent  32df30e24087e1d8dd0b5de78f8b5c2713dfdf42
Re-add parens lost when paravirtualized

Changeset a08261650b8a lost a set of parens for likely:
-       if (likely((pci_addr & ~to_pci_dev(dev)->dma_mask) == 0)) {
+       if (likely(pci_addr & ~to_pci_dev(dev)->dma_mask) == 0 &&
+                  !range_straddles_page_boundary(addr, size)) {

These could go back around the original test or surrouding both.
To facilitate the fast path, I think it makes sense to include both.

Signed-off-by: Aron Griffis <aron@xxxxxx>

diff -r 32df30e24087 -r 303be5b19de1 arch/ia64/hp/common/sba_iommu.c
--- a/arch/ia64/hp/common/sba_iommu.c   Tue Oct 23 10:23:00 2007 -0600
+++ b/arch/ia64/hp/common/sba_iommu.c   Tue Nov 06 08:48:40 2007 -0500
@@ -944,8 +944,8 @@ sba_map_single(struct device *dev, void 
        /*
        ** Check if the PCI device can DMA to ptr... if so, just return ptr
        */
-       if (likely(pci_addr & ~to_pci_dev(dev)->dma_mask) == 0 &&
-                  !range_straddles_page_boundary(__pa(addr), size)) {
+       if (likely((pci_addr & ~to_pci_dev(dev)->dma_mask) == 0 &&
+                   !range_straddles_page_boundary(__pa(addr), size))) {
                /*
                ** Device is bit capable of DMA'ing to the buffer...
                ** just return the PCI address of ptr

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

<Prev in Thread] Current Thread [Next in Thread>