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] linux: satisfy newer modpost requirements

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: satisfy newer modpost requirements
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 13 Mar 2008 16:15:05 +0000
Delivery-date: Thu, 13 Mar 2008 09:14:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
pcifront_scan_root() calls pci_scan_bus_parented() possibly after core
kernel initialization, but that latter function is marked __devinit.
While HOTPLUG can be turned off only under EMBEDDED, 2.6.25's modpost
still (validly) catches this as an incorrect reference. Marking
pcifront_scan_root() __init_refok seems too dangerous, however, so
instead the much more streamlined pcifront_backend_changed() is being
marked so, and the rest of the offending dependencies is being marked
__devinit, and XEN_PCIDEV_FRONTEND now selects HOTPLUG to make it
independend of any changes in HOTPLUG's prompt visibility.

As usual, written and tested on 2.6.25-rc5 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-03-11/arch/i386/Kconfig
===================================================================
--- head-2008-03-11.orig/arch/i386/Kconfig      2008-03-11 17:15:16.000000000 
+0100
+++ head-2008-03-11/arch/i386/Kconfig   2008-03-11 17:17:12.000000000 +0100
@@ -1065,6 +1065,7 @@ config XEN_PCIDEV_FRONTEND
 config XEN_PCIDEV_FRONTEND
        bool
        depends on PCI && X86_XEN && (PCI_GOXEN_FE || PCI_GOANY)
+       select HOTPLUG
        default y
 
 config XEN_PCIDEV_FE_DEBUG
Index: head-2008-03-11/arch/x86_64/Kconfig
===================================================================
--- head-2008-03-11.orig/arch/x86_64/Kconfig    2008-03-11 17:15:16.000000000 
+0100
+++ head-2008-03-11/arch/x86_64/Kconfig 2008-03-11 17:17:12.000000000 +0100
@@ -621,6 +621,7 @@ config XEN_PCIDEV_FRONTEND
 config XEN_PCIDEV_FRONTEND
        bool "Xen PCI Frontend"
        depends on PCI && X86_64_XEN
+       select HOTPLUG
        default y
        help
          The PCI device frontend driver allows the kernel to import arbitrary
Index: head-2008-03-11/drivers/xen/pcifront/pci_op.c
===================================================================
--- head-2008-03-11.orig/drivers/xen/pcifront/pci_op.c  2008-03-06 
10:08:47.000000000 +0100
+++ head-2008-03-11/drivers/xen/pcifront/pci_op.c       2008-03-06 
12:27:27.000000000 +0100
@@ -295,8 +295,8 @@ static void pcifront_claim_resource(stru
        }
 }
 
-int pcifront_scan_root(struct pcifront_device *pdev,
-                      unsigned int domain, unsigned int bus)
+int __devinit pcifront_scan_root(struct pcifront_device *pdev,
+                                unsigned int domain, unsigned int bus)
 {
        struct pci_bus *b;
        struct pcifront_sd *sd = NULL;
@@ -353,8 +353,8 @@ int pcifront_scan_root(struct pcifront_d
        return err;
 }
 
-int pcifront_rescan_root(struct pcifront_device *pdev,
-                        unsigned int domain, unsigned int bus)
+int __devinit pcifront_rescan_root(struct pcifront_device *pdev,
+                                  unsigned int domain, unsigned int bus)
 {
        struct pci_bus *b;
        struct pci_dev *d;
Index: head-2008-03-11/drivers/xen/pcifront/xenbus.c
===================================================================
--- head-2008-03-11.orig/drivers/xen/pcifront/xenbus.c  2008-03-06 
10:11:09.000000000 +0100
+++ head-2008-03-11/drivers/xen/pcifront/xenbus.c       2008-03-06 
12:20:49.000000000 +0100
@@ -123,7 +123,7 @@ static int pcifront_publish_info(struct 
        return err;
 }
 
-static int pcifront_try_connect(struct pcifront_device *pdev)
+static int __devinit pcifront_try_connect(struct pcifront_device *pdev)
 {
        int err = -EFAULT;
        int i, num_roots, len;
@@ -214,7 +214,7 @@ static int pcifront_try_disconnect(struc
        return err;
 }
 
-static int pcifront_attach_devices(struct pcifront_device *pdev)
+static int __devinit pcifront_attach_devices(struct pcifront_device *pdev)
 {
        int err = -EFAULT;
        int i, num_roots, len;
@@ -360,8 +360,8 @@ static int pcifront_detach_devices(struc
        return err;
 }
 
-static void pcifront_backend_changed(struct xenbus_device *xdev,
-                                    enum xenbus_state be_state)
+static void __init_refok pcifront_backend_changed(struct xenbus_device *xdev,
+                                                 enum xenbus_state be_state)
 {
        struct pcifront_device *pdev = xdev->dev.driver_data;
 




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

<Prev in Thread] Current Thread [Next in Thread>