From: Joel Stanley <joel@jms.id.au>
To: benh@kernel.crashing.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, jk@ozlabs.org
Subject: [PATCH] powerpc: opal-msglog: Report size of memcons log
Date: Fri, 13 Jan 2017 14:23:49 +1030 [thread overview]
Message-ID: <20170113035349.15923-1-joel@jms.id.au> (raw)
The OPAL memory console is reported to be size zero, as we do not
initialise the struct attr with any size information due to the size
being variable. This leads users to think that the console is empty.
Instead report the maximum size.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/powerpc/platforms/powernv/opal-msglog.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal-msglog.c b/arch/powerpc/platforms/powernv/opal-msglog.c
index 39d6ff9e5630..8486b2ceb510 100644
--- a/arch/powerpc/platforms/powernv/opal-msglog.c
+++ b/arch/powerpc/platforms/powernv/opal-msglog.c
@@ -123,6 +123,10 @@ void __init opal_msglog_init(void)
return;
}
+ /* Report maximum size */
+ opal_msglog_attr.size = be64_to_cpu(mc->ibuf_size) +
+ be64_to_cpu(mc->obuf_size);
+
opal_memcons = mc;
}
--
2.11.0
next reply other threads:[~2017-01-13 3:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 3:53 Joel Stanley [this message]
2017-01-23 8:32 ` [PATCH] powerpc: opal-msglog: Report size of memcons log Michael Ellerman
2017-01-25 2:33 ` Michael Ellerman
2017-01-25 8:50 ` Joel Stanley
2017-01-27 0:40 ` Michael Ellerman
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=20170113035349.15923-1-joel@jms.id.au \
--to=joel@jms.id.au \
--cc=benh@kernel.crashing.org \
--cc=jk@ozlabs.org \
--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;
as well as URLs for NNTP newsgroup(s).