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-devel

[Xen-devel] [PATCH 4/4] dom0 linux: Cleanup function name relating resou

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4/4] dom0 linux: Cleanup function name relating resource reassignment.
From: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
Date: Thu, 25 Dec 2008 16:11:05 +0900
Cc:
Delivery-date: Wed, 24 Dec 2008 23:15:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081225155054.858A.SHIMADA-YXB@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20081225155054.858A.SHIMADA-YXB@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch cleanups 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.

Thanks,
--
Yuji Shimada.


Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>

diff -r b392502044ca -r cff7296661fe Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt       Thu Dec 25 10:44:39 2008 +0900
+++ b/Documentation/kernel-parameters.txt       Thu Dec 25 13:45:26 2008 +0900
@@ -1240,6 +1240,11 @@
                                bootloader. This is currently used on
                                IXP2000 systems where the bus has to be
                                configured a certain way for adjunct CPUs.
+               reassigndev=
+                               Format: 
[<segment>:]<bus>:<dev>.<func>[,[<segment>:]<bus>:<dev>.<func>[,...]]
+                               Specifies device to reassign page-aligned memory
+                               resources. PCI-PCI bridge can be specified, if
+                               resource windows need to be expanded.
                reassign_resources
                                Use guestdev parameter to reassign device's
                                resources.
diff -r b392502044ca -r cff7296661fe drivers/pci/pci.h
--- a/drivers/pci/pci.h Thu Dec 25 10:44:39 2008 +0900
+++ b/drivers/pci/pci.h Thu Dec 25 13:45:26 2008 +0900
@@ -100,10 +100,10 @@
 }
 
 #ifdef CONFIG_PCI_REASSIGN
-extern int is_reassigndev(struct pci_dev *dev);
+extern int pci_is_reassigndev(struct pci_dev *dev);
 extern void pci_disable_bridge_window(struct pci_dev *dev);
 #else
-#define is_reassigndev(dev) 0
+#define pci_is_reassigndev(dev) 0
 #endif
 
 #ifdef CONFIG_PCI_GUESTDEV
diff -r b392502044ca -r cff7296661fe drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Thu Dec 25 10:44:39 2008 +0900
+++ b/drivers/pci/quirks.c      Thu Dec 25 13:45:26 2008 +0900
@@ -36,7 +36,7 @@
        int i;
        struct resource *r;
 
-       if (is_reassigndev(dev)) {
+       if (pci_is_reassigndev(dev)) {
                if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
                    (dev->class >> 8) == PCI_CLASS_BRIDGE_HOST) {
                        /* PCI Host Bridge isn't a target device */
diff -r b392502044ca -r cff7296661fe drivers/pci/reassigndev.c
--- a/drivers/pci/reassigndev.c Thu Dec 25 10:44:39 2008 +0900
+++ b/drivers/pci/reassigndev.c Thu Dec 25 13:45:26 2008 +0900
@@ -26,15 +26,15 @@
 
 static char param_reassigndev[REASSIGNDEV_PARAM_MAX] = {0};
 
-static int __init reassigndev_setup(char *str)
+static int __init pci_reassigndev_setup(char *str)
 {
        strncpy(param_reassigndev, str, REASSIGNDEV_PARAM_MAX);
        param_reassigndev[REASSIGNDEV_PARAM_MAX - 1] = '\0';
        return 1;
 }
-__setup("reassigndev=", reassigndev_setup);
+__setup("reassigndev=", pci_reassigndev_setup);
 
-int is_reassigndev(struct pci_dev *dev)
+int pci_is_reassigndev(struct pci_dev *dev)
 {
        char dev_str[TOKEN_MAX+1];
        int seg, bus, slot, func;
diff -r b392502044ca -r cff7296661fe drivers/pci/setup-bus.c
--- a/drivers/pci/setup-bus.c   Thu Dec 25 10:44:39 2008 +0900
+++ b/drivers/pci/setup-bus.c   Thu Dec 25 13:45:26 2008 +0900
@@ -345,7 +345,7 @@
 
        list_for_each_entry(dev, &bus->devices, bus_list) {
                int i;
-               int reassign = is_reassigndev(dev);
+               int reassign = pci_is_reassigndev(dev);
 
                for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                        struct resource *r = &dev->resource[i];
diff -r b392502044ca -r cff7296661fe drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c   Thu Dec 25 10:44:39 2008 +0900
+++ b/drivers/pci/setup-res.c   Thu Dec 25 13:45:26 2008 +0900
@@ -138,7 +138,7 @@
        struct resource *res = dev->resource + resno;
        resource_size_t size, min, align;
        int ret;
-       int reassigndev = is_reassigndev(dev);
+       int reassigndev = pci_is_reassigndev(dev);
 
        size = res->end - res->start + 1;
        min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
@@ -234,7 +234,7 @@
 pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
 {
        int i;
-       int reassigndev = is_reassigndev(dev);
+       int reassigndev = pci_is_reassigndev(dev);
 
        for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                struct resource *r;
@@ -271,7 +271,7 @@
                                        ln->res->start;
                                if ((idx < PCI_BRIDGE_RESOURCES) &&
                                    (ln->res->flags & IORESOURCE_MEM) &&
-                                   is_reassigndev(ln->dev))
+                                   pci_is_reassigndev(ln->dev))
                                        align = ALIGN(align, PAGE_SIZE);
                        }
                        if (r_align > align) {


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 4/4] dom0 linux: Cleanup function name relating resource reassignment., Yuji Shimada <=