Skip to content

Commit

Permalink
powerpc/xmon: Allow passing an argument to ppc_md.restart()
Browse files Browse the repository at this point in the history
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: Oliver O'Halloran <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
oohal authored and mpe committed Jan 23, 2020
1 parent 846a17a commit 2d9b332
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,16 +1192,19 @@ static int do_step(struct pt_regs *regs)

static void bootcmds(void)
{
char tmp[64];
int cmd;

cmd = inchar();
if (cmd == 'r')
ppc_md.restart(NULL);
else if (cmd == 'h')
if (cmd == 'r') {
getstring(tmp, 64);
ppc_md.restart(tmp);
} else if (cmd == 'h') {
ppc_md.halt();
else if (cmd == 'p')
} else if (cmd == 'p') {
if (pm_power_off)
pm_power_off();
}
}

static int cpu_cmd(void)
Expand Down

0 comments on commit 2d9b332

Please sign in to comment.