From: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: sashiko-reviews@lists.linux.dev, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH RFC 08/11] watchdog: sbsa: Handle IRQ probe deferral
Date: Tue, 29 Sep 2026 11:09:23 +0200 [thread overview]
Message-ID: <aruAQ0qOGU6W2NhS@red-moon> (raw)
In-Reply-To: <d9102e7e-a69a-4ad5-aa38-c2cbd9d98496@roeck-us.net>
On Fri, Sep 25, 2026 at 06:46:31AM -0700, Guenter Roeck wrote:
> On Fri, Sep 25, 2026 at 07:57:26AM +0000, sashiko-bot@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [High] watchdog: sbsa: system reset due to unserviced watchdog on probe defer
> > --
> >
> > commit 82d6b6d0cf8ddd44758931db5360cd8439795f6f
> > Author: Lorenzo Pieralisi <lpieralisi@kernel.org>
> >
> > watchdog: sbsa: Handle IRQ probe deferral
> >
> > This commit handles probe deferral when mapping the IRQ for the SBSA watchdog
> > by returning -EPROBE_DEFER.
> >
> > > diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
> > > index e04d42cc7774d..f4491409caf5d 100644
> > > --- a/drivers/watchdog/sbsa_gwdt.c
> > > +++ b/drivers/watchdog/sbsa_gwdt.c
> > > @@ -352,6 +352,8 @@ static int sbsa_gwdt_probe(struct platform_device *pdev)
> > >
> > > if (action) {
> > > irq = platform_get_irq(pdev, 0);
> > > + if (irq == -EPROBE_DEFER)
> > > + return dev_err_probe(dev, irq, "failed to get ws0 interrupt\n");
> >
> > [Severity: High]
> > Does returning here during probe deferral risk an unintended system reset?
> >
> > If the bootloader leaves the SBSA hardware watchdog running, the driver
> > correctly detects this via status & SBSA_GWDT_WCS_EN and sets
> > WDOG_HW_RUNNING.
> >
> > Because we abort probe registration here, the core remains unaware of the
> > device and will not ping it. If the deferral period exceeds the hardware
> > watchdog timeout, won't it expire and trigger a reset?
> >
> > Previously, if platform_get_irq() returned -EPROBE_DEFER, the driver fell
> > back to single-stage mode (action = 0), and successfully registered the
> > watchdog, allowing the core to immediately start servicing it.
> >
> Looks like a valid concern to me.
Right. Just to understand the issue (forgive me the stupid question), isn't
there a time window where this can happen then even without IRQ probe deferral
taken into account ?
What's the best course of action then ? Ignore -EPROBE_DEFER and treat it
as failure (basically, dropping this patch ?) ?
Thanks,
Lorenzo
>
> Guenter
>
> > > if (irq < 0) {
> > > action = 0;
> > > dev_warn(dev, "unable to get ws0 interrupt.\n");
> >
> > --
> > Sashiko AI review · https://sashiko.dev/#/patchset/20260925-acpi-static-table-irq-probe-defer-v1-0-2c62125d0085@kernel.org?part=8
> >
next prev parent reply other threads:[~2026-09-29 9:09 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 7:47 [PATCH RFC 00/11] ACPI: ARM64: Implement IRQ mapping probe deferral for static table devices Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 01/11] ACPI: irq: Return -EPROBE_DEFER on missing IRQ domain Lorenzo Pieralisi
2026-09-25 8:02 ` sashiko-bot
2026-09-25 9:45 ` Andy Shevchenko
2026-09-25 7:48 ` [PATCH RFC 02/11] ACPI: Introduce irq_get() for static fwnodes Lorenzo Pieralisi
2026-09-25 7:59 ` sashiko-bot
2026-09-25 9:49 ` Andy Shevchenko
2026-09-25 10:30 ` Lorenzo Pieralisi
2026-09-25 10:54 ` Andy Shevchenko
2026-09-25 11:32 ` Lorenzo Pieralisi
2026-09-28 16:15 ` Lorenzo Pieralisi
2026-09-30 17:13 ` Jonathan Cameron
2026-10-06 16:19 ` Robin Murphy
2026-10-07 7:44 ` Lorenzo Pieralisi
2026-09-28 23:24 ` Ashok Raj
2026-09-29 8:40 ` Lorenzo Pieralisi
2026-09-30 0:38 ` Ashok Raj
2026-09-30 7:40 ` Andy Shevchenko
2026-09-30 7:56 ` Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 03/11] driver core: platform: Add static ACPI nodes IRQ retrieval/mapping code Lorenzo Pieralisi
2026-09-25 8:00 ` sashiko-bot
2026-09-25 9:54 ` Andy Shevchenko
2026-09-25 10:16 ` Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 04/11] clocksource/drivers/arm_arch_timer_mmio: Dispose IRQ mappings on probe failure Lorenzo Pieralisi
2026-09-25 9:52 ` Andy Shevchenko
2026-09-25 7:48 ` [PATCH RFC 05/11] clocksource/drivers/arm_arch_timer_mmio: Implement arch mem timer deferred probe Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 06/11] ACPI: GTDT: Convert SBSA watchdog to IRQ properties Lorenzo Pieralisi
2026-09-25 9:56 ` Andy Shevchenko
2026-09-25 7:48 ` [PATCH RFC 07/11] ACPI/IORT: Convert IORT devices to IRQs software-node properties Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 08/11] watchdog: sbsa: Handle IRQ probe deferral Lorenzo Pieralisi
2026-09-25 7:57 ` sashiko-bot
2026-09-25 13:46 ` Guenter Roeck
2026-09-29 9:09 ` Lorenzo Pieralisi [this message]
2026-09-29 14:30 ` Guenter Roeck
2026-09-25 7:48 ` [PATCH RFC 09/11] iommu/arm-smmu: Add arm-smmu IRQ mapping -EPROBE_DEFER handling Lorenzo Pieralisi
2026-09-25 7:57 ` sashiko-bot
2026-09-25 7:48 ` [PATCH RFC 10/11] iommu/arm-smmu-v3: Add " Lorenzo Pieralisi
2026-09-28 22:41 ` Ashok Raj
2026-09-29 8:43 ` Lorenzo Pieralisi
2026-09-25 7:48 ` [PATCH RFC 11/11] perf/arm-smmu-v3-pmu: " Lorenzo Pieralisi
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=aruAQ0qOGU6W2NhS@red-moon \
--to=lpieralisi@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.