xen/arm: Print message if reset did not work

If for some reason the hardware reset is not working, print a message to
the user every 5 seconds to warn him that the system did not reset
properly and Xen is still looping.

The message is printed infinitely so that someone connecting to a serial
console with no history would see the message coming after 5 seconds.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
[stefano: remove second '!']
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
This commit is contained in:
Bertrand Marquis authored and Stefano Stabellini committed 2020-10-20 13:20:31 -07:00
1 parent aace546699
commit 3b49791e4c
1 file changed
+4
+4
View File
@@ -36,6 +36,7 @@ void machine_halt(void)
void machine_restart(unsigned int delay_millisecs)
{
int timeout = 10;
unsigned long count = 0;
watchdog_disable();
console_start_sync();
@@ -59,6 +60,9 @@ void machine_restart(unsigned int delay_millisecs)
{
platform_reset();
mdelay(100);
if ( (count % 50) == 0 )
printk(XENLOG_ERR "Xen: Platform reset did not work properly!\n");
count++;
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.