]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/xmon: Paginate kernel log buffer display
authorSam bobroff <sam.bobroff@au1.ibm.com>
Thu, 8 Oct 2015 00:50:24 +0000 (11:50 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 15 Oct 2015 09:32:02 +0000 (20:32 +1100)
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@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/xmon.c

index f829baf45fd7dd91fdab0df7782a92896bd0cb60..bf8f49a8b3a7d9edbc55043cc34296ed11e04260 100644 (file)
@@ -242,9 +242,7 @@ Commands:\n\
 "  u   dump TLB\n"
 #endif
 "  ?   help\n"
-#ifdef CONFIG_PPC64
-"  # n limit output to n lines per page (dump paca only)\n"
-#endif
+"  # n limit output to n lines per page (for dp, dpa, dl)\n"
 "  zr  reboot\n\
   zh   halt\n"
 ;
@@ -2333,10 +2331,12 @@ dump_log_buf(void)
        sync();
 
        kmsg_dump_rewind_nolock(&dumper);
+       xmon_start_pagination();
        while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
                buf[len] = '\0';
                printf("%s", buf);
        }
+       xmon_end_pagination();
 
        sync();
        /* wait a little while to see if we get a machine check */