]> git.ipfire.org Git - people/ms/linux.git/commitdiff
openrisc: define nop command for simulator reboot
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 28 Apr 2022 11:11:39 +0000 (13:11 +0200)
committerStafford Horne <shorne@gmail.com>
Mon, 23 May 2022 08:15:49 +0000 (17:15 +0900)
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@zx2c4.com/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/process.c

index 3c0c91bcdcbaa135feaf0c3e2cb23344425852cd..4cce95fa6eb5f8ede4707a17c340a72f1f9cf92f 100644 (file)
@@ -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);