Skip to content

Commit

Permalink
powerpc/powernv: Report size of OPAL memcons log
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joel Stanley authored and Michael Ellerman committed Jan 25, 2017
1 parent 8ad4333 commit 14a41d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/platforms/powernv/opal-msglog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 14a41d6

Please sign in to comment.