Commit e3bc8049 authored by Michael Ellerman's avatar Michael Ellerman Committed by Benjamin Herrenschmidt

powerpc: Fixup whitespace in xmon

There are a few whitespace goolies in xmon.c, some of them appear to
be my fault. Fix them all in one go.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ca5dd395
...@@ -895,13 +895,13 @@ cmds(struct pt_regs *excp) ...@@ -895,13 +895,13 @@ cmds(struct pt_regs *excp)
#endif #endif
default: default:
printf("Unrecognized command: "); printf("Unrecognized command: ");
do { do {
if (' ' < cmd && cmd <= '~') if (' ' < cmd && cmd <= '~')
putchar(cmd); putchar(cmd);
else else
printf("\\x%x", cmd); printf("\\x%x", cmd);
cmd = inchar(); cmd = inchar();
} while (cmd != '\n'); } while (cmd != '\n');
printf(" (type ? for help)\n"); printf(" (type ? for help)\n");
break; break;
} }
...@@ -1098,7 +1098,7 @@ static long check_bp_loc(unsigned long addr) ...@@ -1098,7 +1098,7 @@ static long check_bp_loc(unsigned long addr)
return 1; return 1;
} }
static char *breakpoint_help_string = static char *breakpoint_help_string =
"Breakpoint command usage:\n" "Breakpoint command usage:\n"
"b show breakpoints\n" "b show breakpoints\n"
"b <addr> [cnt] set breakpoint at given instr addr\n" "b <addr> [cnt] set breakpoint at given instr addr\n"
...@@ -1194,7 +1194,7 @@ bpt_cmds(void) ...@@ -1194,7 +1194,7 @@ bpt_cmds(void)
default: default:
termch = cmd; termch = cmd;
cmd = skipbl(); cmd = skipbl();
if (cmd == '?') { if (cmd == '?') {
printf(breakpoint_help_string); printf(breakpoint_help_string);
break; break;
...@@ -1360,7 +1360,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr, ...@@ -1360,7 +1360,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr,
sp + REGS_OFFSET); sp + REGS_OFFSET);
break; break;
} }
printf("--- Exception: %lx %s at ", regs.trap, printf("--- Exception: %lx %s at ", regs.trap,
getvecname(TRAP(&regs))); getvecname(TRAP(&regs)));
pc = regs.nip; pc = regs.nip;
lr = regs.link; lr = regs.link;
...@@ -1624,14 +1624,14 @@ static void super_regs(void) ...@@ -1624,14 +1624,14 @@ static void super_regs(void)
cmd = skipbl(); cmd = skipbl();
if (cmd == '\n') { if (cmd == '\n') {
unsigned long sp, toc; unsigned long sp, toc;
asm("mr %0,1" : "=r" (sp) :); asm("mr %0,1" : "=r" (sp) :);
asm("mr %0,2" : "=r" (toc) :); asm("mr %0,2" : "=r" (toc) :);
printf("msr = "REG" sprg0= "REG"\n", printf("msr = "REG" sprg0= "REG"\n",
mfmsr(), mfspr(SPRN_SPRG0)); mfmsr(), mfspr(SPRN_SPRG0));
printf("pvr = "REG" sprg1= "REG"\n", printf("pvr = "REG" sprg1= "REG"\n",
mfspr(SPRN_PVR), mfspr(SPRN_SPRG1)); mfspr(SPRN_PVR), mfspr(SPRN_SPRG1));
printf("dec = "REG" sprg2= "REG"\n", printf("dec = "REG" sprg2= "REG"\n",
mfspr(SPRN_DEC), mfspr(SPRN_SPRG2)); mfspr(SPRN_DEC), mfspr(SPRN_SPRG2));
printf("sp = "REG" sprg3= "REG"\n", sp, mfspr(SPRN_SPRG3)); printf("sp = "REG" sprg3= "REG"\n", sp, mfspr(SPRN_SPRG3));
...@@ -1784,7 +1784,7 @@ byterev(unsigned char *val, int size) ...@@ -1784,7 +1784,7 @@ byterev(unsigned char *val, int size)
static int brev; static int brev;
static int mnoread; static int mnoread;
static char *memex_help_string = static char *memex_help_string =
"Memory examine command usage:\n" "Memory examine command usage:\n"
"m [addr] [flags] examine/change memory\n" "m [addr] [flags] examine/change memory\n"
" addr is optional. will start where left off.\n" " addr is optional. will start where left off.\n"
...@@ -1799,7 +1799,7 @@ static char *memex_help_string = ...@@ -1799,7 +1799,7 @@ static char *memex_help_string =
"NOTE: flags are saved as defaults\n" "NOTE: flags are saved as defaults\n"
""; "";
static char *memex_subcmd_help_string = static char *memex_subcmd_help_string =
"Memory examine subcommands:\n" "Memory examine subcommands:\n"
" hexval write this val to current location\n" " hexval write this val to current location\n"
" 'string' write chars from string to this location\n" " 'string' write chars from string to this location\n"
...@@ -2065,7 +2065,7 @@ prdump(unsigned long adrs, long ndump) ...@@ -2065,7 +2065,7 @@ prdump(unsigned long adrs, long ndump)
nr = mread(adrs, temp, r); nr = mread(adrs, temp, r);
adrs += nr; adrs += nr;
for (m = 0; m < r; ++m) { for (m = 0; m < r; ++m) {
if ((m & (sizeof(long) - 1)) == 0 && m > 0) if ((m & (sizeof(long) - 1)) == 0 && m > 0)
putchar(' '); putchar(' ');
if (m < nr) if (m < nr)
printf("%.2x", temp[m]); printf("%.2x", temp[m]);
...@@ -2073,7 +2073,7 @@ prdump(unsigned long adrs, long ndump) ...@@ -2073,7 +2073,7 @@ prdump(unsigned long adrs, long ndump)
printf("%s", fault_chars[fault_type]); printf("%s", fault_chars[fault_type]);
} }
for (; m < 16; ++m) { for (; m < 16; ++m) {
if ((m & (sizeof(long) - 1)) == 0) if ((m & (sizeof(long) - 1)) == 0)
putchar(' '); putchar(' ');
printf(" "); printf(" ");
} }
...@@ -2153,13 +2153,13 @@ dump_log_buf(void) ...@@ -2153,13 +2153,13 @@ dump_log_buf(void)
unsigned char buf[128]; unsigned char buf[128];
size_t len; size_t len;
if (setjmp(bus_error_jmp) != 0) { if (setjmp(bus_error_jmp) != 0) {
printf("Error dumping printk buffer!\n"); printf("Error dumping printk buffer!\n");
return; return;
} }
catch_memory_errors = 1; catch_memory_errors = 1;
sync(); sync();
kmsg_dump_rewind_nolock(&dumper); kmsg_dump_rewind_nolock(&dumper);
while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) { while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
...@@ -2167,10 +2167,10 @@ dump_log_buf(void) ...@@ -2167,10 +2167,10 @@ dump_log_buf(void)
printf("%s", buf); printf("%s", buf);
} }
sync(); sync();
/* wait a little while to see if we get a machine check */ /* wait a little while to see if we get a machine check */
__delay(200); __delay(200);
catch_memory_errors = 0; catch_memory_errors = 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment