aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-07 18:44:04 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-09 19:35:29 -0400
commit3ea1ae989a9ddcfe15b80dc8cea5c4d38a13b9ab (patch)
treed6f3e4667c9e81ce2112923712868c813c0d7619 /arch
parent7e4bbaf0bf13c33be275e8a17997597dfd0ed03a (diff)
powerpc/eeh: More logs for EEH initialization
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_dev.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index 8e3443b260e4..a0cee3a29c97 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -100,6 +100,8 @@ static int __init eeh_dev_phb_init(void)
100 list_for_each_entry_safe(phb, tmp, &hose_list, list_node) 100 list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
101 eeh_dev_phb_init_dynamic(phb); 101 eeh_dev_phb_init_dynamic(phb);
102 102
103 pr_info("EEH: devices created\n");
104
103 return 0; 105 return 0;
104} 106}
105 107
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 5e2805a019c3..cf6d6cc0be80 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -561,7 +561,19 @@ static struct eeh_ops pseries_eeh_ops = {
561 */ 561 */
562static int __init eeh_pseries_init(void) 562static int __init eeh_pseries_init(void)
563{ 563{
564 return eeh_ops_register(&pseries_eeh_ops); 564 int ret = -EINVAL;
565
566 if (!machine_is(pseries))
567 return ret;
568
569 ret = eeh_ops_register(&pseries_eeh_ops);
570 if (!ret)
571 pr_info("EEH: pSeries platform initialized\n");
572 else
573 pr_info("EEH: pSeries platform initialization failure (%d)\n",
574 ret);
575
576 return ret;
565} 577}
566 578
567early_initcall(eeh_pseries_init); 579early_initcall(eeh_pseries_init);