core_initcall_sync(eeh_init);
 
+static int eeh_device_notifier(struct notifier_block *nb,
+                              unsigned long action, void *data)
+{
+       struct device *dev = data;
+
+       switch (action) {
+       /*
+        * Note: It's not possible to perform EEH device addition (i.e.
+        * {pseries,pnv}_pcibios_bus_add_device()) here because it depends on
+        * the device's resources, which have not yet been set up.
+        */
+       case BUS_NOTIFY_DEL_DEVICE:
+               eeh_remove_device(to_pci_dev(dev));
+               break;
+       default:
+               break;
+       }
+       return NOTIFY_DONE;
+}
+
+static struct notifier_block eeh_device_nb = {
+       .notifier_call = eeh_device_notifier,
+};
+
+static __init int eeh_set_bus_notifier(void)
+{
+       bus_register_notifier(&pci_bus_type, &eeh_device_nb);
+       return 0;
+}
+arch_initcall(eeh_set_bus_notifier);
+
 /**
  * eeh_probe_device() - Perform EEH initialization for the indicated pci device
  * @dev: pci device for which to set up EEH
 
        struct pci_controller *phb = pci_bus_to_host(dev->bus);
        struct pci_dn *pdn = pci_get_pdn(dev);
 
-       eeh_remove_device(dev);
-
        if (phb->controller_ops.release_device)
                phb->controller_ops.release_device(dev);