mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>,
	Patrick Williams <patrick@stwcx.xyz>,
	"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	 "linux@roeck-us.net" <linux@roeck-us.net>
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: Fri, 08 Nov 2024 10:19:32 +1030	[thread overview]
Message-ID: <ed77d57facaaef0be796b4c6a742dc7bf3bff479.camel@codeconstruct.com.au> (raw)
In-Reply-To: <TYZPR06MB5203053A004676F51322DECFB25C2@TYZPR06MB5203.apcprd06.prod.outlook.com>

Hi Chin-Ting,

On Thu, 2024-11-07 at 05:35 +0000, Chin-Ting Kuo wrote:
> Hi Andrew,
> 
> Thanks for the check.
> 
> > -----Original Message-----
> > From: Andrew Jeffery <andrew@codeconstruct.com.au>
> > Sent: Monday, November 4, 2024 8:02 AM
> > Subject: Re: [PATCH v4 1/3] watchdog: aspeed: Update bootstatus
> > handling
> > 
> > On Fri, 2024-11-01 at 14:21 -0400, Patrick Williams wrote:
> > > On Fri, Nov 01, 2024 at 08:11:59PM +0800, Chin-Ting Kuo wrote:
> > > > The boot status mapping rule follows the latest design guide
> > > > from
> > > > the OpenBMC shown as below.
> > > > https://github.com/openbmc/docs/blob/master/designs/bmc-reboot-cause
> > > > -update.md#proposed-design
> > > > - WDIOF_EXTERN1   => system is reset by Software
> > > > - WDIOF_CARDRESET => system is reset by WDT SoC reset
> > > > - Others          => other reset events, e.g., power on reset.
> > > 
> > > I'm quite surprised that the above is relevant for a kernel
> > > driver at
> > > all.  Isn't "EXTERN1" a name of a real watchdog signal from your
> > > hardware (my recollection is that there are 2 external
> > > watchdogs).
> > 
> > I think you may be referring to WDTRST1 (and WDTRST2) here.
> > 
> 
> WDTRST1, wdt_ext, is a pulse signal generated when WDT timeout
> occurs. However, depending on the HW board design, wdt_ext doesn’t
> always affect the system reset. Thus, EXTERN1 boot status can be
> ignored in ASPEED WDT driver and just implement "CARDRESET" and
> "others" types since EXTERN1 is not always affected/controlled by WDT
> controller directly. Or, an additional property in dts can be added
> to
> distinguish whether the current EXTRST# reset event is triggered by
> wdt_ext signal.

Yep, I understand how it works. I was responding to Patrick's query to
clear up some confusion around the watchdog signal names.

> > 
> > > 
> > > Having said that, it was known that there would need to be
> > > changes to
> > > the driver because some of these conditions were not adequately
> > > exposed at all.  I'm just still surprised that we're needing to
> > > reference that document as part of these changes.
> > 
> > I think the main question is whether an internal, graceful
> > (userspace-
> > requested) reset is a reasonable use of WDIOF_EXTERN[12]. My
> > feeling no. I
> > wonder whether defining a new flag (WDIOF_REBOOT?
> > WDIOF_GRACEFUL?) in the UAPI would be acceptable?
> > 
> 
> Agree, but this is out of the scope of this patch series and can be
> discussed and
> implemented in the other future patches.

I disagree, because then you're changing the userspace-visible
behaviour of the driver yet again. I don't prefer the proposed patch as
the way forward because I think it is abusing the meaning of
WDIOF_EXTERN1. I think the concept needs input from the watchdog
maintainers.

Andrew

  reply	other threads:[~2024-11-07 23:49 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 [this message]
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
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=ed77d57facaaef0be796b4c6a742dc7bf3bff479.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --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=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=linux@roeck-us.net \
    --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

all inboxes | Powered by JetHome®