[PATCH v2 2/2] powerpc/xmon: Paginate kernel log buffer display
Sam Bobroff
sam.bobroff at au1.ibm.com
Fri Aug 21 14:24:28 AEST 2015
The kernel log buffer is often much longer than the size of a terminal
so paginate it's output.
Signed-off-by: Sam Bobroff <sam.bobroff at au1.ibm.com>
---
arch/powerpc/xmon/xmon.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 9ce9e7d..fdd765e 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -248,9 +248,7 @@ Commands:\n\
" u dump TLB\n"
#endif
" ? help\n"
-#ifdef CONFIG_PPC64
-" .# limit output to # lines per page (dump paca only)\n"
-#endif
+" .# limit output to # lines per page (for dp#, dpa, dl)\n"
" zr reboot\n\
zh halt\n"
;
@@ -850,6 +848,7 @@ static void paged_set_size(void)
paged_size = 0;
}
}
+
static void paged_reset(void)
{
paged_cur_page = 0;
@@ -2372,10 +2371,12 @@ dump_log_buf(void)
sync();
kmsg_dump_rewind_nolock(&dumper);
+ paged_start();
while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
buf[len] = '\0';
- printf("%s", buf);
+ XMON_PRINTF("%s", buf);
}
+ paged_end("dl\n");
sync();
/* wait a little while to see if we get a machine check */
--
2.1.4
More information about the Linuxppc-dev
mailing list