Skip to content

Commit

Permalink
powerpc/powernv: Check OPAL elog calls exist before using
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Neuling authored and Michael Ellerman committed Sep 25, 2014
1 parent 035ed26 commit 7dc992e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/platforms/powernv/opal-elog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit 7dc992e

Please sign in to comment.