From: Guenter Roeck <linux@roeck-us.net>
To: Andrew Jeffery <andrew@codeconstruct.com.au>,
Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>,
Patrick Williams <patrick@stwcx.xyz>,
"wim@linux-watchdog.org" <wim@linux-watchdog.org>
Cc: "joel@jms.id.au" <joel@jms.id.au>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"Peter.Yin@quantatw.com" <Peter.Yin@quantatw.com>,
"Patrick_NC_Lin@wiwynn.com" <Patrick_NC_Lin@wiwynn.com>,
"Bonnie_Lo@wiwynn.com" <Bonnie_Lo@wiwynn.com>,
"DELPHINE_CHIU@wiwynn.com" <DELPHINE_CHIU@wiwynn.com>,
BMC-SW <BMC-SW@aspeedtech.com>,
"chnguyen@amperecomputing.com" <chnguyen@amperecomputing.com>
Subject: Re: [PATCH v4 1/3] watchdog: aspeed: Update bootstatus handling
Date: Mon, 18 Nov 2024 17:27:45 -0800 [thread overview]
Message-ID: <9565c496-44d8-4214-8038-931926210d0f@roeck-us.net> (raw)
In-Reply-To: <219607ab74764f3d47659fb5ab3223b3034152e5.camel@codeconstruct.com.au>
On 11/18/24 15:00, Andrew Jeffery wrote:
> On Mon, 2024-11-18 at 12:50 -0800, Guenter Roeck wrote:
>> On 11/18/24 04:46, Chin-Ting Kuo wrote:
>>> Hi Guenter,
>>>
>>> Thanks for the reply.
>>>
>>>> -----Original Message-----
>>>> From: Guenter Roeck <groeck7@gmail.com> On Behalf Of Guenter
>>>> Roeck
>>>> Sent: Friday, November 8, 2024 10:08 PM
>>>> Subject: Re: [PATCH v4 1/3] watchdog: aspeed: Update bootstatus
>>>> handling
>>>>
>>>> On 11/7/24 21:42, Chin-Ting Kuo wrote:
>>>>
>>>>> But now, I think it will be better to add a patch for creating
>>>>> a new
>>>>> reset reason, e.g., WDIOF_REBOOT or WDIOF_RESTART, in
>>>>> watchdog.h of
>>>>> uapi. Can I include this change, creating a new reset reason,
>>>>> in this
>>>>> patch series? Or, should I create an extra new patch series for
>>>>> this
>>>>> purpose?
>>>>>
>>>>
>>>> This is a UAPI change. That is a major change. It needs to be
>>>> discussed
>>>> separately, on its own, and can not be sneaked in like this.
>>>>
>>>
>>> Agree. However, how to trigger this discussion? Can I just send a
>>> new
>>> patch separately with only this UAPI modification? This is the
>>> first time
>>> I change such common source code.
>>>
>>
>> Yes. That needs to include arguments explaining why this specific new
>> flag
>> even adds value. I for my part don't immediately see that value.
>
> So maybe I was derailed with my WDIOF_REBOOT suggestion by the proposal
> to repurpose WDIOF_EXTERN1 to indicate a regular reboot. I still don't
> think repurposing WDIOF_EXTERN1 is the right direction. But, perhaps
> the thing to do for a regular reboot is to not set any reason flags at
> all? It just depends on whether we're wanting to separate a cold boot
> from a reboot (as they _may_ behave differently on Aspeed hardware), as
> on a cold boot we wouldn't set any reason flags either.
>
Thew point here is that this is just a warm reboot which happens to use
the watchdog as vehicle trigger a reset. A UAPI change along that line
would tell the user just that, and I don't see the value in it.
FWIW, the only really valuable flag is WDIOF_CARDRESET. All others are
at best misleading since the watchdog isn't typically involved in
making policy decisions such as WDIOF_OVERHEAT or WDIOF_FANFAULT and thus
can not report such reasons to userspace.
Unfortunately we can at best deprecate all those existing flags. At the same
time I really don't want to introduce new ones unless they provide real value.
While it might be valuable to know if a reboot was a cold or a warm reboot,
the watchdog subsystem is not involved in this either on almost all
platforms, meaning userspace can not really rely on it. Yes, Aspeed
hardware may behave differently, but typically all those differences
would need to be handled in the kernel when (re-)initializing the hardware,
not in userspace.
So, again, what exactly would userspace do with the information that this
was a watchdog triggered warm reboot ? Why would it need that information ?
Thanks,
Guenter
next prev parent reply other threads:[~2024-11-19 1:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 12:11 [PATCH v4 0/3] Update ASPEED WDT bootstatus Chin-Ting Kuo
2024-11-01 12:11 ` [PATCH v4 1/3] watchdog: aspeed: Update bootstatus handling Chin-Ting Kuo
2024-11-01 18:21 ` Patrick Williams
2024-11-04 0:01 ` Andrew Jeffery
2024-11-07 5:35 ` Chin-Ting Kuo
2024-11-07 23:49 ` Andrew Jeffery
2024-11-08 5:42 ` Chin-Ting Kuo
2024-11-08 14:07 ` Guenter Roeck
2024-11-18 12:46 ` Chin-Ting Kuo
2024-11-18 20:50 ` Guenter Roeck
2024-11-18 23:00 ` Andrew Jeffery
2024-11-19 1:27 ` Guenter Roeck [this message]
2024-11-20 4:54 ` Andrew Jeffery
2024-12-17 2:15 ` Chin-Ting Kuo
2024-11-07 5:34 ` Chin-Ting Kuo
2024-11-01 22:16 ` Guenter Roeck
2024-11-07 5:35 ` Chin-Ting Kuo
2024-11-01 12:12 ` [PATCH v4 2/3] watchdog: aspeed: Change aspeed_wdt_config struct name to aspeed_wdt_data Chin-Ting Kuo
2024-11-01 22:19 ` Guenter Roeck
2024-11-01 12:12 ` [PATCH v4 3/3] watchdog: aspeed: Update restart implementations Chin-Ting Kuo
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=9565c496-44d8-4214-8038-931926210d0f@roeck-us.net \
--to=linux@roeck-us.net \
--cc=BMC-SW@aspeedtech.com \
--cc=Bonnie_Lo@wiwynn.com \
--cc=DELPHINE_CHIU@wiwynn.com \
--cc=Patrick_NC_Lin@wiwynn.com \
--cc=Peter.Yin@quantatw.com \
--cc=andrew@codeconstruct.com.au \
--cc=chin-ting_kuo@aspeedtech.com \
--cc=chnguyen@amperecomputing.com \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=patrick@stwcx.xyz \
--cc=wim@linux-watchdog.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