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>
void machine_restart(unsigned int delay_millisecs)
{
int timeout = 10;
+ unsigned long count = 0;
watchdog_disable();
console_start_sync();
{
platform_reset();
mdelay(100);
+ if ( (count % 50) == 0 )
+ printk(XENLOG_ERR "Xen: Platform reset did not work properly!\n");
+ count++;
}
}