]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
[IA64] Re-add parens lost when paravirtualized
authorAlex Williamson <alex.williamson@hp.com>
Tue, 6 Nov 2007 21:11:43 +0000 (14:11 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 6 Nov 2007 21:11:43 +0000 (14:11 -0700)
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@hp.com>
arch/ia64/hp/common/sba_iommu.c

index 4c0c58bb6574d80c24510c8a7b39be797dfffa3c..797462afcda59499df68836eaaf315f8b7285522 100644 (file)
@@ -944,8 +944,8 @@ sba_map_single(struct device *dev, void *addr, size_t size, int dir)
        /*
        ** 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