ia64/linux-2.6.18-xen.hg

changeset 477:7a8ac7a685ba

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@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 18 11:18:06 2008 +0000 (2008-03-18)
parents 15d72fac31de
children 7e06ed4efc2b
files arch/i386/Kconfig arch/x86_64/Kconfig drivers/xen/pcifront/pci_op.c drivers/xen/pcifront/xenbus.c
line diff
     1.1 --- a/arch/i386/Kconfig	Tue Mar 18 11:17:05 2008 +0000
     1.2 +++ b/arch/i386/Kconfig	Tue Mar 18 11:18:06 2008 +0000
     1.3 @@ -1065,6 +1065,7 @@ config PCI_MMCONFIG
     1.4  config XEN_PCIDEV_FRONTEND
     1.5  	bool
     1.6  	depends on PCI && X86_XEN && (PCI_GOXEN_FE || PCI_GOANY)
     1.7 +	select HOTPLUG
     1.8  	default y
     1.9  
    1.10  config XEN_PCIDEV_FE_DEBUG
     2.1 --- a/arch/x86_64/Kconfig	Tue Mar 18 11:17:05 2008 +0000
     2.2 +++ b/arch/x86_64/Kconfig	Tue Mar 18 11:18:06 2008 +0000
     2.3 @@ -621,6 +621,7 @@ config PCI_MMCONFIG
     2.4  config XEN_PCIDEV_FRONTEND
     2.5  	bool "Xen PCI Frontend"
     2.6  	depends on PCI && X86_64_XEN
     2.7 +	select HOTPLUG
     2.8  	default y
     2.9  	help
    2.10  	  The PCI device frontend driver allows the kernel to import arbitrary
     3.1 --- a/drivers/xen/pcifront/pci_op.c	Tue Mar 18 11:17:05 2008 +0000
     3.2 +++ b/drivers/xen/pcifront/pci_op.c	Tue Mar 18 11:18:06 2008 +0000
     3.3 @@ -295,8 +295,8 @@ static void pcifront_claim_resource(stru
     3.4  	}
     3.5  }
     3.6  
     3.7 -int pcifront_scan_root(struct pcifront_device *pdev,
     3.8 -		       unsigned int domain, unsigned int bus)
     3.9 +int __devinit pcifront_scan_root(struct pcifront_device *pdev,
    3.10 +				 unsigned int domain, unsigned int bus)
    3.11  {
    3.12  	struct pci_bus *b;
    3.13  	struct pcifront_sd *sd = NULL;
    3.14 @@ -353,8 +353,8 @@ int pcifront_scan_root(struct pcifront_d
    3.15  	return err;
    3.16  }
    3.17  
    3.18 -int pcifront_rescan_root(struct pcifront_device *pdev,
    3.19 -			 unsigned int domain, unsigned int bus)
    3.20 +int __devinit pcifront_rescan_root(struct pcifront_device *pdev,
    3.21 +				   unsigned int domain, unsigned int bus)
    3.22  {
    3.23  	struct pci_bus *b;
    3.24  	struct pci_dev *d;
     4.1 --- a/drivers/xen/pcifront/xenbus.c	Tue Mar 18 11:17:05 2008 +0000
     4.2 +++ b/drivers/xen/pcifront/xenbus.c	Tue Mar 18 11:18:06 2008 +0000
     4.3 @@ -123,7 +123,7 @@ static int pcifront_publish_info(struct 
     4.4  	return err;
     4.5  }
     4.6  
     4.7 -static int pcifront_try_connect(struct pcifront_device *pdev)
     4.8 +static int __devinit pcifront_try_connect(struct pcifront_device *pdev)
     4.9  {
    4.10  	int err = -EFAULT;
    4.11  	int i, num_roots, len;
    4.12 @@ -214,7 +214,7 @@ static int pcifront_try_disconnect(struc
    4.13  	return err;
    4.14  }
    4.15  
    4.16 -static int pcifront_attach_devices(struct pcifront_device *pdev)
    4.17 +static int __devinit pcifront_attach_devices(struct pcifront_device *pdev)
    4.18  {
    4.19  	int err = -EFAULT;
    4.20  	int i, num_roots, len;
    4.21 @@ -360,8 +360,8 @@ static int pcifront_detach_devices(struc
    4.22  	return err;
    4.23  }
    4.24  
    4.25 -static void pcifront_backend_changed(struct xenbus_device *xdev,
    4.26 -				     enum xenbus_state be_state)
    4.27 +static void __init_refok pcifront_backend_changed(struct xenbus_device *xdev,
    4.28 +						  enum xenbus_state be_state)
    4.29  {
    4.30  	struct pcifront_device *pdev = xdev->dev.driver_data;
    4.31