xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Bertrand Marquis <bertrand.marquis@arm.com>
Cc: xen-devel@lists.xenproject.org,
	 Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	 Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH] xen/arm: Print message if reset did not work
Date: Mon, 19 Oct 2020 10:37:37 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.21.2010191036230.12247@sstabellini-ThinkPad-T480s> (raw)
In-Reply-To: <74a7359983a9d25ca62a6edd41805ab92918e2a1.1602856636.git.bertrand.marquis@arm.com>

On Fri, 16 Oct 2020, Bertrand Marquis wrote:
> 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>
> ---
>  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..600088ec48 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++;

I'd think that one "!" is enough :-) but anyway

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


  reply	other threads:[~2020-10-19 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 13:58 [PATCH] xen/arm: Print message if reset did not work Bertrand Marquis
2020-10-19 17:37 ` Stefano Stabellini [this message]
2020-10-20 12:46   ` Bertrand Marquis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2010191036230.12247@sstabellini-ThinkPad-T480s \
    --to=sstabellini@kernel.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).