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] linux/pci/reassign: fix alignment cal

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/pci/reassign: fix alignment calculation
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Apr 2009 13:05:06 -0700
Delivery-date: Tue, 14 Apr 2009 13:05:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239704186 -3600
# Node ID 3a8677ef8fd0e7fbdbd79ef6924fe87deb5b8710
# Parent  35b981251e102e114f2a0731a03e697d5a16b8d1
linux/pci/reassign: fix alignment calculation

Later r_align is incremented, so it must be decremented
as compensation.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 drivers/pci/setup-res.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 35b981251e10 -r 3a8677ef8fd0 drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c   Tue Apr 14 11:16:08 2009 +0100
+++ b/drivers/pci/setup-res.c   Tue Apr 14 11:16:26 2009 +0100
@@ -246,8 +246,9 @@ pdev_sort_resources(struct pci_dev *dev,
                        continue;
                
                if (i < PCI_BRIDGE_RESOURCES && (r->flags & IORESOURCE_MEM) &&
-                   reassigndev)
-                       r_align = ALIGN(r_align, PAGE_SIZE);
+                   !r_align && reassigndev)
+                       /* -1 is compensation for +1 in the following calc. */
+                       r_align = ALIGN(r_align, PAGE_SIZE) - 1;
 
                if (!r_align) {
                        printk(KERN_WARNING "PCI: Ignore bogus resource %d "

_______________________________________________
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] linux/pci/reassign: fix alignment calculation, Xen patchbot-linux-2.6.18-xen <=