diff options
author | Michael Neuling <mikey@neuling.org> | 2014-08-19 14:48:02 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-09-25 23:14:36 +1000 |
commit | 831cf65b0295de75f40f8cf52ce62e5d261dab4f (patch) | |
tree | 18875a103cc4bce755cc76ba05a0942ac07cec54 /arch/powerpc/platforms | |
parent | 7dc992ec7b3fd875b05f49f454a922ee94af330b (diff) | |
download | op-kernel-dev-831cf65b0295de75f40f8cf52ce62e5d261dab4f.zip op-kernel-dev-831cf65b0295de75f40f8cf52ce62e5d261dab4f.tar.gz |
powerpc/powernv: Check OPAL dump calls exist before using
Check that the OPAL_DUMP_READ token exists before initalising the elog
infrastructure.
This avoids littering the OPAL console with:
"OPAL: Called with bad token 91"
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-dump.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c index 3b81995..23260f7 100644 --- a/arch/powerpc/platforms/powernv/opal-dump.c +++ b/arch/powerpc/platforms/powernv/opal-dump.c @@ -427,6 +427,10 @@ void __init opal_platform_dump_init(void) { int rc; + /* ELOG not supported by firmware */ + if (!opal_check_token(OPAL_DUMP_READ)) + return; + dump_kset = kset_create_and_add("dump", NULL, opal_kobj); if (!dump_kset) { pr_warn("%s: Failed to create dump kset\n", __func__); |