All of lore.kernel.org
 help / color / mirror / Atom feed
* [OpenRISC] [PATCH] openrisc: define nop command for simulator reboot
@ 2022-04-28 11:11 ` Jason A. Donenfeld
  0 siblings, 0 replies; 8+ messages in thread
From: Jason A. Donenfeld @ 2022-04-28 11:11 UTC (permalink / raw)
  To: openrisc

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@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/all/YmnaDUpVI5ihgvg6 at zx2c4.com/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-30 22:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28 11:11 [OpenRISC] [PATCH] openrisc: define nop command for simulator reboot Jason A. Donenfeld
2022-04-28 11:11 ` Jason A. Donenfeld
2022-04-28 11:55 ` [OpenRISC] " Stafford Horne
2022-04-28 11:55   ` Stafford Horne
2022-04-28 12:42   ` [OpenRISC] " Jason A. Donenfeld
2022-04-28 12:42     ` Jason A. Donenfeld
2022-04-30 22:45     ` [OpenRISC] " Stafford Horne
2022-04-30 22:45       ` Stafford Horne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.