[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] xen pcifront: satisfy newer modpost requirements



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205839086 0
# Node ID 7a8ac7a685ba6a24ad24d459e2717f165febbbaa
# Parent  15d72fac31de6ff445e03539c451915feef6436b
xen pcifront: satisfy newer modpost requirements

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.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/Kconfig             |    1 +
 arch/x86_64/Kconfig           |    1 +
 drivers/xen/pcifront/pci_op.c |    8 ++++----
 drivers/xen/pcifront/xenbus.c |    8 ++++----
 4 files changed, 10 insertions(+), 8 deletions(-)

diff -r 15d72fac31de -r 7a8ac7a685ba arch/i386/Kconfig
--- a/arch/i386/Kconfig Tue Mar 18 11:17:05 2008 +0000
+++ b/arch/i386/Kconfig Tue Mar 18 11:18:06 2008 +0000
@@ -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
diff -r 15d72fac31de -r 7a8ac7a685ba arch/x86_64/Kconfig
--- a/arch/x86_64/Kconfig       Tue Mar 18 11:17:05 2008 +0000
+++ b/arch/x86_64/Kconfig       Tue Mar 18 11:18:06 2008 +0000
@@ -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
diff -r 15d72fac31de -r 7a8ac7a685ba drivers/xen/pcifront/pci_op.c
--- a/drivers/xen/pcifront/pci_op.c     Tue Mar 18 11:17:05 2008 +0000
+++ b/drivers/xen/pcifront/pci_op.c     Tue Mar 18 11:18:06 2008 +0000
@@ -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;
diff -r 15d72fac31de -r 7a8ac7a685ba drivers/xen/pcifront/xenbus.c
--- a/drivers/xen/pcifront/xenbus.c     Tue Mar 18 11:17:05 2008 +0000
+++ b/drivers/xen/pcifront/xenbus.c     Tue Mar 18 11:18:06 2008 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.