瀏覽代碼

powerpc/powernv: Report size of OPAL memcons log

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>
Joel Stanley 8 年之前
父節點
當前提交
14a41d6b75
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/powerpc/platforms/powernv/opal-msglog.c

+ 4 - 0
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 =  be32_to_cpu(mc->ibuf_size) +
+		be32_to_cpu(mc->obuf_size);
+
 	opal_memcons = mc;
 }