linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: opal-msglog: Report size of memcons log
@ 2017-01-13  3:53 Joel Stanley
  2017-01-23  8:32 ` Michael Ellerman
  2017-01-27  0:40 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Stanley @ 2017-01-13  3:53 UTC (permalink / raw)
  To: benh, mpe; +Cc: linuxppc-dev, jk

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-27  0:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13  3:53 [PATCH] powerpc: opal-msglog: Report size of memcons log Joel Stanley
2017-01-23  8:32 ` Michael Ellerman
2017-01-25  2:33   ` Michael Ellerman
2017-01-25  8:50     ` Joel Stanley
2017-01-27  0:40 ` Michael Ellerman

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).