diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2019-11-01 19:55:21 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-01-23 21:31:21 +1100 |
commit | 2d9b332d99b24f27f77e9ba38ce3c8beb11a81c0 (patch) | |
tree | f42055f64b309101840bf6788d28a16c008cdc6e /arch/powerpc/xmon | |
parent | 846a17a53aeeee426cbc1252f517a6660eab1427 (diff) | |
download | linux-2d9b332d99b24f27f77e9ba38ce3c8beb11a81c0.tar.gz linux-2d9b332d99b24f27f77e9ba38ce3c8beb11a81c0.tar.bz2 linux-2d9b332d99b24f27f77e9ba38ce3c8beb11a81c0.zip |
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: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191101085522.3055-1-oohall@gmail.com
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 03d23075ac43..e8c84d265602 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -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) |