ia64/linux-2.6.18-xen.hg

changeset 707:f7a2c0985f99

dom0: remove "pci-mem-align" option

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Oct 22 11:54:44 2008 +0100 (2008-10-22)
parents c87adc976013
children e410857fd83c
files drivers/pci/bus.c drivers/pci/quirks.c
line diff
     1.1 --- a/drivers/pci/bus.c	Mon Oct 20 15:29:07 2008 +0100
     1.2 +++ b/drivers/pci/bus.c	Wed Oct 22 11:54:44 2008 +0100
     1.3 @@ -17,8 +17,6 @@
     1.4  
     1.5  #include "pci.h"
     1.6  
     1.7 -extern int pci_mem_align;
     1.8 -
     1.9  /**
    1.10   * pci_bus_alloc_resource - allocate a resource from a parent bus
    1.11   * @bus: PCI bus
    1.12 @@ -46,11 +44,6 @@ pci_bus_alloc_resource(struct pci_bus *b
    1.13  
    1.14  	type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
    1.15  
    1.16 -	/* If the boot parameter 'pci-mem-align' was specified then we need to 
    1.17 -	   align the memory addresses, at page size alignment. */
    1.18 -	if (pci_mem_align && (align < (PAGE_SIZE-1)))
    1.19 -		align = PAGE_SIZE - 1;
    1.20 -
    1.21  	for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
    1.22  		struct resource *r = bus->resource[i];
    1.23  		if (!r)
     2.1 --- a/drivers/pci/quirks.c	Mon Oct 20 15:29:07 2008 +0100
     2.2 +++ b/drivers/pci/quirks.c	Wed Oct 22 11:54:44 2008 +0100
     2.3 @@ -23,25 +23,17 @@
     2.4  #include <linux/acpi.h>
     2.5  #include "pci.h"
     2.6  
     2.7 -/* A global flag which signals if we should page-align PCI mem windows. */
     2.8 -int pci_mem_align = 0;
     2.9  
    2.10 -static int __init set_pci_mem_align(char *str)
    2.11 -{
    2.12 -	pci_mem_align = 1;
    2.13 -	return 1;
    2.14 -}
    2.15 -__setup("pci-mem-align", set_pci_mem_align);
    2.16 -
    2.17 -
    2.18 -/* This quirk function enables us to force all memory resources which are 
    2.19 - * assigned to PCI devices, to be page-aligned.
    2.20 +/*
    2.21 + * This quirk function disables the device and releases resources
    2.22 + * which is specified by kernel's boot parameter 'reassigndev'.
    2.23 + * Later on, kernel will assign page-aligned memory resource back
    2.24 + * to that device.
    2.25   */
    2.26 -static void __devinit quirk_align_mem_resources(struct pci_dev *dev)
    2.27 +static void __devinit quirk_release_resources(struct pci_dev *dev)
    2.28  {
    2.29  	int i;
    2.30  	struct resource *r;
    2.31 -	resource_size_t old_start;
    2.32  
    2.33  	if (is_reassigndev(dev)) {
    2.34  		if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
    2.35 @@ -76,21 +68,8 @@ static void __devinit quirk_align_mem_re
    2.36  		}
    2.37  		return;
    2.38  	}
    2.39 -
    2.40 -	if (!pci_mem_align)
    2.41 -		return;
    2.42 -
    2.43 -	for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
    2.44 -		r = &dev->resource[i];
    2.45 -		if ((r == NULL) || !(r->flags & IORESOURCE_MEM))
    2.46 -			continue;
    2.47 -
    2.48 -		old_start = r->start;
    2.49 -		r->start = (r->start + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
    2.50 -		r->end = r->end - (old_start - r->start);
    2.51 -	}
    2.52  }
    2.53 -DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources);
    2.54 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_release_resources);
    2.55  
    2.56  /* The Mellanox Tavor device gives false positive parity errors
    2.57   * Mark this device with a broken_parity_status, to allow