[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: Print message if reset did not work
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Tue, 20 Oct 2020 12:46:53 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ymAY57WbRSpaYvoliG/60y285l3xgcLZeaAMKsM1xRI=; b=bf9pn+9CFpa0G1UAMVe+vv33DBNfwMObwikfpr9oOgg5MKS4brBZjVs/JUlmFA+fVtHDNvN9C4F88OoFwloPuJHJeNJ0N9nVU6eihTS3cOXW1CxgMSuVjzBlwj1h4vlWXVdixixscEedUA3JShCJDkLpc0pBgU3VQTymdXgBeEOaUWhq4jp5WUTrXxMjMsb07jZVGNwUrQFeeTIKWMzMRmvRIjZT8Zgot3Mul4aUqkHXLj29JPGzafS4E+BGvYdejkfcNayDRe8G6U7U/TX7UMexO0CfBMxRdkw1ESR0lsvd0HLUZN3ljUNGhYE+1PdeFuV3ESv7/r2d1SuU9cuJSg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K2pDN0fYvZC4AcqXidKzY91/vE7/CoPrNDX7EwnrBvFEs+eBdedp9LE65icuIOw7oLFf1SMH+V2k2YoJwSu/x6+g0Rkn3tnQBaDOR/NzIse0KbjNPeyhDO2Mnq74Xgaa5rrjagSlGm1HwJ4kzd2RSc1tf6zeOYCUBvF92mAffOjT1kq+v/B8Cicu6pGPPnl6z76cuYSO0EKSW8Q5ARum2KMOi0gC6HjnreOmN2PYpkjJEECKk4Y1mUPrupMt6HipWyMkAQmLNJJQUrIWyQQh1+uxKmXy7MhYlEvdrF1DLcgCORXrcG/qA2vOj1fOWyFsj9rwhyw8elBe6dMkvgmOyg==
- Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
- Cc: "open list:X86" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 20 Oct 2020 12:47:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
- Thread-index: AQHWo8Slq58ZQPuN/USs6zrkcavsmamfNYiAgAFBGoA=
- Thread-topic: [PATCH] xen/arm: Print message if reset did not work
> On 19 Oct 2020, at 18:37, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>
> 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@xxxxxxx>
>> ---
>> 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
True :-)
Feel to limit the exclamation to one while committing.
>
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Thanks
Bertrand
|