summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal-elog.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2014-08-19 14:48:01 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2014-09-25 23:14:36 +1000
commit7dc992ec7b3fd875b05f49f454a922ee94af330b (patch)
treec84d92499415a2c7343384dbe1bc80d54c0c951b /arch/powerpc/platforms/powernv/opal-elog.c
parent035ed26fb090ff3277900259f19d57e54da2e116 (diff)
downloadop-kernel-dev-7dc992ec7b3fd875b05f49f454a922ee94af330b.zip
op-kernel-dev-7dc992ec7b3fd875b05f49f454a922ee94af330b.tar.gz
powerpc/powernv: Check OPAL elog calls exist before using
Check that the OPAL_ELOG_READ token exists before initalising the elog infrastructure. This avoids littering the OPAL console with: "OPAL: Called with bad token 74" Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-elog.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal-elog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index bbdb3ff..518fe95 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -295,6 +295,10 @@ int __init opal_elog_init(void)
{
int rc = 0;
+ /* ELOG not supported by firmware */
+ if (!opal_check_token(OPAL_ELOG_READ))
+ return -1;
+
elog_kset = kset_create_and_add("elog", NULL, opal_kobj);
if (!elog_kset) {
pr_warn("%s: failed to create elog kset\n", __func__);
OpenPOWER on IntegriCloud