Commit 2d9b332d authored by Oliver O'Halloran's avatar Oliver O'Halloran Committed by Michael Ellerman

powerpc/xmon: Allow passing an argument to ppc_md.restart()

On PowerNV a few different kinds of reboot are supported. We'd like to be
able to exercise these from xmon so allow 'zr' to take an argument, and
pass that to the ppc_md.restart() function.
Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191101085522.3055-1-oohall@gmail.com
parent 846a17a5
...@@ -1192,16 +1192,19 @@ static int do_step(struct pt_regs *regs) ...@@ -1192,16 +1192,19 @@ static int do_step(struct pt_regs *regs)
static void bootcmds(void) static void bootcmds(void)
{ {
char tmp[64];
int cmd; int cmd;
cmd = inchar(); cmd = inchar();
if (cmd == 'r') if (cmd == 'r') {
ppc_md.restart(NULL); getstring(tmp, 64);
else if (cmd == 'h') ppc_md.restart(tmp);
} else if (cmd == 'h') {
ppc_md.halt(); ppc_md.halt();
else if (cmd == 'p') } else if (cmd == 'p') {
if (pm_power_off) if (pm_power_off)
pm_power_off(); pm_power_off();
}
} }
static int cpu_cmd(void) static int cpu_cmd(void)
......
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