From: Michael Neuling Date: Tue, 19 Aug 2014 04:48:02 +0000 (+1000) Subject: powerpc/powernv: Check OPAL dump calls exist before using X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=831cf65b0295de75f40f8cf52ce62e5d261dab4f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c index 3b819959337c..23260f7dfa7a 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__);