ia64/linux-2.6.18-xen.hg

changeset 771:cfb171ddbb33

Cleanup function name relating resource reassignment.

Existing functions don't have "pci_" prefix. But they are part of PCI
driver. So the patch adds "pci_" prefix to them.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 05 10:54:36 2009 +0000 (2009-01-05)
parents 78d81e85e8cd
children 79e82ae1bad0
files Documentation/kernel-parameters.txt drivers/pci/pci.h drivers/pci/quirks.c drivers/pci/reassigndev.c drivers/pci/setup-bus.c drivers/pci/setup-res.c
line diff
     1.1 --- a/Documentation/kernel-parameters.txt	Mon Jan 05 10:54:08 2009 +0000
     1.2 +++ b/Documentation/kernel-parameters.txt	Mon Jan 05 10:54:36 2009 +0000
     1.3 @@ -1240,6 +1240,11 @@ running once the system is up.
     1.4  				bootloader. This is currently used on
     1.5  				IXP2000 systems where the bus has to be
     1.6  				configured a certain way for adjunct CPUs.
     1.7 +		reassigndev=
     1.8 +				Format: [<segment>:]<bus>:<dev>.<func>[,[<segment>:]<bus>:<dev>.<func>[,...]]
     1.9 +				Specifies device to reassign page-aligned memory
    1.10 +				resources. PCI-PCI bridge can be specified, if
    1.11 +				resource windows need to be expanded.
    1.12  		reassign_resources
    1.13  				Use guestdev parameter to reassign device's
    1.14  				resources.
     2.1 --- a/drivers/pci/pci.h	Mon Jan 05 10:54:08 2009 +0000
     2.2 +++ b/drivers/pci/pci.h	Mon Jan 05 10:54:36 2009 +0000
     2.3 @@ -100,10 +100,10 @@ pci_match_one_device(const struct pci_de
     2.4  }
     2.5  
     2.6  #ifdef CONFIG_PCI_REASSIGN
     2.7 -extern int is_reassigndev(struct pci_dev *dev);
     2.8 +extern int pci_is_reassigndev(struct pci_dev *dev);
     2.9  extern void pci_disable_bridge_window(struct pci_dev *dev);
    2.10  #else
    2.11 -#define is_reassigndev(dev) 0
    2.12 +#define pci_is_reassigndev(dev) 0
    2.13  #endif
    2.14  
    2.15  #ifdef CONFIG_PCI_GUESTDEV
     3.1 --- a/drivers/pci/quirks.c	Mon Jan 05 10:54:08 2009 +0000
     3.2 +++ b/drivers/pci/quirks.c	Mon Jan 05 10:54:36 2009 +0000
     3.3 @@ -36,7 +36,7 @@ static void __devinit quirk_release_reso
     3.4  	int i;
     3.5  	struct resource *r;
     3.6  
     3.7 -	if (is_reassigndev(dev)) {
     3.8 +	if (pci_is_reassigndev(dev)) {
     3.9  		if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
    3.10  		    (dev->class >> 8) == PCI_CLASS_BRIDGE_HOST) {
    3.11  			/* PCI Host Bridge isn't a target device */
     4.1 --- a/drivers/pci/reassigndev.c	Mon Jan 05 10:54:08 2009 +0000
     4.2 +++ b/drivers/pci/reassigndev.c	Mon Jan 05 10:54:36 2009 +0000
     4.3 @@ -26,15 +26,15 @@
     4.4  
     4.5  static char param_reassigndev[REASSIGNDEV_PARAM_MAX] = {0};
     4.6  
     4.7 -static int __init reassigndev_setup(char *str)
     4.8 +static int __init pci_reassigndev_setup(char *str)
     4.9  {
    4.10  	strncpy(param_reassigndev, str, REASSIGNDEV_PARAM_MAX);
    4.11  	param_reassigndev[REASSIGNDEV_PARAM_MAX - 1] = '\0';
    4.12  	return 1;
    4.13  }
    4.14 -__setup("reassigndev=", reassigndev_setup);
    4.15 +__setup("reassigndev=", pci_reassigndev_setup);
    4.16  
    4.17 -int is_reassigndev(struct pci_dev *dev)
    4.18 +int pci_is_reassigndev(struct pci_dev *dev)
    4.19  {
    4.20  	char dev_str[TOKEN_MAX+1];
    4.21  	int seg, bus, slot, func;
     5.1 --- a/drivers/pci/setup-bus.c	Mon Jan 05 10:54:08 2009 +0000
     5.2 +++ b/drivers/pci/setup-bus.c	Mon Jan 05 10:54:36 2009 +0000
     5.3 @@ -345,7 +345,7 @@ pbus_size_mem(struct pci_bus *bus, unsig
     5.4  
     5.5  	list_for_each_entry(dev, &bus->devices, bus_list) {
     5.6  		int i;
     5.7 -		int reassign = is_reassigndev(dev);
     5.8 +		int reassign = pci_is_reassigndev(dev);
     5.9  
    5.10  		for (i = 0; i < PCI_NUM_RESOURCES; i++) {
    5.11  			struct resource *r = &dev->resource[i];
     6.1 --- a/drivers/pci/setup-res.c	Mon Jan 05 10:54:08 2009 +0000
     6.2 +++ b/drivers/pci/setup-res.c	Mon Jan 05 10:54:36 2009 +0000
     6.3 @@ -138,7 +138,7 @@ int pci_assign_resource(struct pci_dev *
     6.4  	struct resource *res = dev->resource + resno;
     6.5  	resource_size_t size, min, align;
     6.6  	int ret;
     6.7 -	int reassigndev = is_reassigndev(dev);
     6.8 +	int reassigndev = pci_is_reassigndev(dev);
     6.9  
    6.10  	size = res->end - res->start + 1;
    6.11  	min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
    6.12 @@ -234,7 +234,7 @@ void __devinit
    6.13  pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
    6.14  {
    6.15  	int i;
    6.16 -	int reassigndev = is_reassigndev(dev);
    6.17 +	int reassigndev = pci_is_reassigndev(dev);
    6.18  
    6.19  	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
    6.20  		struct resource *r;
    6.21 @@ -271,7 +271,7 @@ pdev_sort_resources(struct pci_dev *dev,
    6.22  					ln->res->start;
    6.23  				if ((idx < PCI_BRIDGE_RESOURCES) &&
    6.24  				    (ln->res->flags & IORESOURCE_MEM) &&
    6.25 -				    is_reassigndev(ln->dev))
    6.26 +				    pci_is_reassigndev(ln->dev))
    6.27  					align = ALIGN(align, PAGE_SIZE);
    6.28  			}
    6.29  			if (r_align > align) {