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] dom0: remove "pci-mem-align" option

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] dom0: remove "pci-mem-align" option
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 18:30:08 -0700
Delivery-date: Wed, 22 Oct 2008 18:29:50 -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 1224672884 -3600
# Node ID f7a2c0985f9933ac37ce5ec81e33352ff3813006
# Parent  c87adc9760134abb7275728718e44af3dacc515b
dom0: remove "pci-mem-align" option

Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
---
 drivers/pci/bus.c    |    7 -------
 drivers/pci/quirks.c |   41 ++++++++++-------------------------------
 2 files changed, 10 insertions(+), 38 deletions(-)

diff -r c87adc976013 -r f7a2c0985f99 drivers/pci/bus.c
--- a/drivers/pci/bus.c Mon Oct 20 15:29:07 2008 +0100
+++ b/drivers/pci/bus.c Wed Oct 22 11:54:44 2008 +0100
@@ -16,8 +16,6 @@
 #include <linux/init.h>
 
 #include "pci.h"
-
-extern int pci_mem_align;
 
 /**
  * pci_bus_alloc_resource - allocate a resource from a parent bus
@@ -45,11 +43,6 @@ pci_bus_alloc_resource(struct pci_bus *b
        int i, ret = -ENOMEM;
 
        type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
-
-       /* If the boot parameter 'pci-mem-align' was specified then we need to 
-          align the memory addresses, at page size alignment. */
-       if (pci_mem_align && (align < (PAGE_SIZE-1)))
-               align = PAGE_SIZE - 1;
 
        for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
                struct resource *r = bus->resource[i];
diff -r c87adc976013 -r f7a2c0985f99 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Mon Oct 20 15:29:07 2008 +0100
+++ b/drivers/pci/quirks.c      Wed Oct 22 11:54:44 2008 +0100
@@ -23,25 +23,17 @@
 #include <linux/acpi.h>
 #include "pci.h"
 
-/* A global flag which signals if we should page-align PCI mem windows. */
-int pci_mem_align = 0;
-
-static int __init set_pci_mem_align(char *str)
-{
-       pci_mem_align = 1;
-       return 1;
-}
-__setup("pci-mem-align", set_pci_mem_align);
-
-
-/* This quirk function enables us to force all memory resources which are 
- * assigned to PCI devices, to be page-aligned.
- */
-static void __devinit quirk_align_mem_resources(struct pci_dev *dev)
+
+/*
+ * This quirk function disables the device and releases resources
+ * which is specified by kernel's boot parameter 'reassigndev'.
+ * Later on, kernel will assign page-aligned memory resource back
+ * to that device.
+ */
+static void __devinit quirk_release_resources(struct pci_dev *dev)
 {
        int i;
        struct resource *r;
-       resource_size_t old_start;
 
        if (is_reassigndev(dev)) {
                if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
@@ -76,21 +68,8 @@ static void __devinit quirk_align_mem_re
                }
                return;
        }
-
-       if (!pci_mem_align)
-               return;
-
-       for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
-               r = &dev->resource[i];
-               if ((r == NULL) || !(r->flags & IORESOURCE_MEM))
-                       continue;
-
-               old_start = r->start;
-               r->start = (r->start + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
-               r->end = r->end - (old_start - r->start);
-       }
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_release_resources);
 
 /* The Mellanox Tavor device gives false positive parity errors
  * Mark this device with a broken_parity_status, to allow

_______________________________________________
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] dom0: remove "pci-mem-align" option, Xen patchbot-linux-2.6.18-xen <=