]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/powernv: Report size of OPAL memcons log
authorJoel Stanley <joel@jms.id.au>
Fri, 13 Jan 2017 03:53:49 +0000 (14:23 +1030)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Jan 2017 02:33:55 +0000 (13:33 +1100)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-msglog.c

index 39d6ff9e56309f4c6bb73a2f1f2000aeb2ba6df9..7a9cde0cfbd110c97d9229baa1f14633e295a3fe 100644 (file)
@@ -123,6 +123,10 @@ void __init opal_msglog_init(void)
                return;
        }
 
+       /* Report maximum size */
+       opal_msglog_attr.size =  be32_to_cpu(mc->ibuf_size) +
+               be32_to_cpu(mc->obuf_size);
+
        opal_memcons = mc;
 }