summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/eeh_pseries.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-08 02:44:04 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-10 03:35:29 +0400
commit3ea1ae989a9ddcfe15b80dc8cea5c4d38a13b9ab (patch)
treed6f3e4667c9e81ce2112923712868c813c0d7619 /arch/powerpc/platforms/pseries/eeh_pseries.c
parent7e4bbaf0bf13c33be275e8a17997597dfd0ed03a (diff)
downloadlinux-3ea1ae989a9ddcfe15b80dc8cea5c4d38a13b9ab.tar.xz
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/powerpc/platforms/pseries/eeh_pseries.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c14
1 files changed, 13 insertions, 1 deletions
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 = {
*/
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);