[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.