linux: satisfy newer modpost requirements
PATCH 1/1 linux: 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.
As usual, written and tested on 2.6.25-rc5 and made apply to the 2.6.18 tree without further testing.
arch/i386/Kconfig +1 -0
@@ -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
arch/x86_64/Kconfig +1 -0
@@ -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
drivers/xen/pcifront/pci_op.c +4 -4
@@ -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_dreturn 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;
drivers/xen/pcifront/xenbus.c +4 -4
@@ -123,7 +123,7 @@ static int pcifront_publish_info(structreturn 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(strucreturn 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(strucreturn 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;
Quoted 2 lines · Jan Beulich
As usual, written and tested on 2.6.25-rc5 and made apply to the 2.6.18 tree without further testing.
Umm...
$ grep -r init_refok linux-2.6.18-xen.hg/ linux-2.6.18-xen.hg/drivers/xen/pcifront/xenbus.c:static void __init_refok pcifront_backend_changed(struct xenbus_device *xdev,
AFAICT, this doesn't build anywhere. Thanks,
Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.