The patch adds new EEH operation post_init. It's used to notify
the platform that EEH core has completed the EEH probe. By that,
PowerNV platform starts to use the services supplied by EEH
functionality.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 struct eeh_ops {
        char *name;
        int (*init)(void);
+       int (*post_init)(void);
        void* (*of_probe)(struct device_node *dn, void *flag);
        int (*dev_probe)(struct pci_dev *dev, void *flag);
        int (*set_option)(struct eeh_pe *pe, int option);
 
                return -EINVAL;
        }
 
+       /*
+        * Call platform post-initialization. Actually, It's good chance
+        * to inform platform that EEH is ready to supply service if the
+        * I/O cache stuff has been built up.
+        */
+       if (eeh_ops->post_init) {
+               ret = eeh_ops->post_init();
+               if (ret)
+                       return ret;
+       }
+
        if (eeh_subsystem_enabled)
                pr_info("EEH: PCI Enhanced I/O Error Handling Enabled\n");
        else