[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/arm: Print message if reset did not work



commit 3b49791e4cc2f38dd84bf331b75217adaef636e3
Author:     Bertrand Marquis <bertrand.marquis@xxxxxxx>
AuthorDate: Fri Oct 16 14:58:47 2020 +0100
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Tue Oct 20 13:20:31 2020 -0700

    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@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    [stefano: remove second '!']
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
---
 xen/arch/arm/shutdown.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/shutdown.c b/xen/arch/arm/shutdown.c
index b32f07ec0e..3dc6819d56 100644
--- a/xen/arch/arm/shutdown.c
+++ b/xen/arch/arm/shutdown.c
@@ -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++;
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.