From: "Cédric Le Goater" <clg@fr.ibm.com>
To: mpe@ellerman.id.au
Cc: "Cédric Le Goater" <clg@fr.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] powerpc/powernv: check OPAL_REGISTER_DUMP_REGION calls exist
Date: Wed, 25 Feb 2015 18:43:08 +0100 [thread overview]
Message-ID: <1424886188-32068-1-git-send-email-clg@fr.ibm.com> (raw)
On Open Power systems, such call fails in OPAL :
OPAL: Called with bad token 101 !
The check on the OPAL_UNREGISTER_DUMP_REGION call is added for
symmetry. I did not see any errors for it.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
---
arch/powerpc/platforms/powernv/opal.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux.git/arch/powerpc/platforms/powernv/opal.c
===================================================================
--- linux.git.orig/arch/powerpc/platforms/powernv/opal.c
+++ linux.git/arch/powerpc/platforms/powernv/opal.c
@@ -665,6 +665,11 @@ static void __init opal_dump_region_init
uint64_t size;
int rc;
+ if (!opal_check_token(OPAL_REGISTER_DUMP_REGION)) {
+ pr_warn("Firmware doesn't support dump region buffers\n");
+ return;
+ }
+
/* Register kernel log buffer */
addr = log_buf_addr_get();
size = log_buf_len_get();
@@ -794,6 +799,9 @@ void opal_shutdown(void)
mdelay(10);
}
+ if (!opal_check_token(OPAL_UNREGISTER_DUMP_REGION))
+ return;
+
/* Unregister memory dump region */
opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
}
next reply other threads:[~2015-02-25 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 17:43 Cédric Le Goater [this message]
2015-02-25 21:16 ` [PATCH] powerpc/powernv: check OPAL_REGISTER_DUMP_REGION calls exist Stewart Smith
2015-02-25 21:28 ` Cedric Le Goater
2015-02-25 21:53 ` Stewart Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424886188-32068-1-git-send-email-clg@fr.ibm.com \
--to=clg@fr.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox