powerpc/eeh: More logs for EEH initialization
authorGavin Shan <shangw@linux.vnet.ibm.com>
Fri, 7 Sep 2012 22:44:04 +0000 (22:44 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 9 Sep 2012 23:35:29 +0000 (09:35 +1000)
The patch adds more logs to EEH initialization functions for
debugging purpose. Also, the machine type (pSeries) is checked
in the platform initialization to assure it's the correct platform
to invoke it.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/eeh_dev.c
arch/powerpc/platforms/pseries/eeh_pseries.c

index 8e3443b260e4777428bb7bccbb8d1765147fb82f..a0cee3a29c97e920b74e3764f0b44c3dd38be17a 100644 (file)
@@ -100,6 +100,8 @@ static int __init eeh_dev_phb_init(void)
        list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
                eeh_dev_phb_init_dynamic(phb);
 
+       pr_info("EEH: devices created\n");
+
        return 0;
 }
 
index 5e2805a019c3c4f73e76d41daf86796d3c617aff..cf6d6cc0be806a4fc9d53fffded8e5777cc13d1a 100644 (file)
@@ -561,7 +561,19 @@ static struct eeh_ops pseries_eeh_ops = {
  */
 static int __init eeh_pseries_init(void)
 {
-       return eeh_ops_register(&pseries_eeh_ops);
+       int ret = -EINVAL;
+
+       if (!machine_is(pseries))
+               return ret;
+
+       ret = eeh_ops_register(&pseries_eeh_ops);
+       if (!ret)
+               pr_info("EEH: pSeries platform initialized\n");
+       else
+               pr_info("EEH: pSeries platform initialization failure (%d)\n",
+                       ret);
+
+       return ret;
 }
 
 early_initcall(eeh_pseries_init);