x86/amd-iommu: Fix PCI hotplug with passthrough mode
[safe/jmp/linux-2.6] / arch / x86 / kernel / amd_iommu.c
index 450dd6a..a831850 100644 (file)
@@ -1624,6 +1624,11 @@ static struct notifier_block device_nb = {
        .notifier_call = device_change_notifier,
 };
 
+void amd_iommu_init_notifier(void)
+{
+       bus_register_notifier(&pci_bus_type, &device_nb);
+}
+
 /*****************************************************************************
  *
  * The next functions belong to the dma_ops mapping/unmapping code.
@@ -2250,8 +2255,6 @@ int __init amd_iommu_init_dma_ops(void)
 
        register_iommu(&amd_iommu_ops);
 
-       bus_register_notifier(&pci_bus_type, &device_nb);
-
        amd_iommu_stats_init();
 
        return 0;