[PATCH] openrisc: define nop command for simulator reboot

From: Jason A. Donenfeld
Date: Thu Apr 28 2022 - 07:12:03 EST


The simulator defines `l.nop 1` for shutdown, but doesn't have anything
for reboot. Use 13 for this, which is currently unused, dubbed
`NOP_REBOOT`.

Cc: Stafford Horne <shorne@xxxxxxxxx>
Cc: Peter Maydell <peter.maydell@xxxxxxxxxx>
Link: https://lore.kernel.org/all/YmnaDUpVI5ihgvg6@xxxxxxxxx/
Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
---
arch/openrisc/kernel/process.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index 3c0c91bcdcba..4cce95fa6eb5 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -52,6 +52,8 @@ void machine_restart(char *cmd)
{
do_kernel_restart(cmd);

+ __asm__("l.nop 13");
+
/* Give a grace period for failure to restart of 1s */
mdelay(1000);

--
2.35.1