powerpc/vio: Separate vio bus probe and device probe
authorAnton Blanchard <anton@samba.org>
Sun, 24 Jun 2012 18:24:44 +0000 (18:24 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 10 Jul 2012 09:18:54 +0000 (19:18 +1000)
Similar to PCI, separate the bus probe from device probe. This allows
us to attach bus notifiers for DMA debug and IOMMU fault injection
before devices have been probed.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/vio.c

index 7d05fe2b5637049c2f158fa537099c958da6dfbe..3bb5be5da31c0ec743537cd07d4fd97761d9f616 100644 (file)
@@ -1497,12 +1497,18 @@ static int __init vio_bus_init(void)
        if (firmware_has_feature(FW_FEATURE_CMO))
                vio_cmo_bus_init();
 
+       return 0;
+}
+postcore_initcall(vio_bus_init);
+
+static int __init vio_device_init(void)
+{
        vio_bus_scan_register_devices("vdevice");
        vio_bus_scan_register_devices("ibm,platform-facilities");
 
        return 0;
 }
-__initcall(vio_bus_init);
+device_initcall(vio_device_init);
 
 static ssize_t name_show(struct device *dev,
                struct device_attribute *attr, char *buf)