From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: linux-watchdog@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v5 7/8] arm64: dts: renesas: r9a09g077: Use CPG/MSSR syscon for WDTDCR access
Date: Fri, 11 Sep 2026 11:32:15 +0000 [thread overview]
Message-ID: <20260911113216.3810F1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260911111731.3404308-8-prabhakar.mahadev-lad.rj@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The transition to using a syscon regmap for WDTDCR access is broken, preventing the watchdog from probing and containing an out-of-bounds regmap access flaw.
--
commit 0e87a2089f722e3ac7bcab46cff76d445536d9fd
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: arm64: dts: renesas: r9a09g077: Use CPG/MSSR syscon for WDTDCR access
This patch replaces the direct mapping of individual WDTDCR registers for
watchdogs wdt0-wdt5 with a new "renesas,sysc" phandle property pointing
to the CPG/MSSR block. The watchdog driver is expected to use a unified
syscon regmap interface for these accesses.
> diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
> index 40494159831d8..ad5189d55cef2 100644
> --- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
> @@ -327,61 +327,61 @@ channel1 {
>
> wdt0: watchdog@80082000 {
> compatible = "renesas,r9a09g077-wdt";
> - reg = <0 0x80082000 0 0x400>,
> - <0 0x81295100 0 0x04>;
> + reg = <0 0x80082000 0 0x400>;
> clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKL>;
> clock-names = "pclk";
> power-domains = <&cpg>;
> + renesas,sysc = <&cpg 0>;
[Severity: High]
Does this node successfully acquire a syscon regmap from the cpg node?
The cpg node lacks the "syscon" compatible string in its definition:
cpg: clock-controller@80280000 {
compatible = "renesas,r9a09g077-cpg-mssr";
reg = <0 0x80280000 0 0x10000>,
<0 0x81280000 0 0x10000>;
...
};
Without the "syscon" compatible string, syscon_node_to_regmap() will return
-EPROBE_DEFER indefinitely, preventing the watchdog driver from probing.
Furthermore, will the generic syscon regmap allow access to the WDTDCR
registers in the second memory region?
The generic syscon framework only maps the first reg resource region, which
the cpg node defines as 0x10000 bytes. The watchdog driver calculates a
WDTDCR offset of 0x15100 via:
drivers/watchdog/rzv2h_wdt.c:RZT2H_SYS_BLOCK1()
#define RZT2H_SYS_BLOCK1(n) (BIT(16) | (0x5100 + (n) * 4))
This offset exceeds the max_register limit (0xFFFC) of the generic syscon
regmap. When rzt2h_wdt_wdtdcr_count_stop() passes this offset to
regmap_set_bits(), the regmap core will reject the write with -EINVAL.
> status = "disabled";
> };
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911111731.3404308-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=7
next prev parent reply other threads:[~2026-09-11 11:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 11:17 [PATCH v5 0/8] Add syscon support for Renesas WDT driver Prabhakar
2026-09-11 11:17 ` [PATCH v5 1/8] watchdog: rzv2h: Drop enabling clocks in the restart handler Prabhakar
2026-09-11 11:32 ` sashiko-bot
2026-09-11 11:36 ` Lad, Prabhakar
2026-09-11 11:17 ` [PATCH v5 2/8] watchdog: rzv2h: Drop WDTRCR_RSTIRQS define Prabhakar
2026-09-11 11:17 ` [PATCH v5 3/8] watchdog: rzv2h: Propagate WDTDCR access errors Prabhakar
2026-09-11 11:26 ` sashiko-bot
2026-09-11 11:30 ` Lad, Prabhakar
2026-09-11 11:17 ` [PATCH v5 4/8] watchdog: rzv2h: Use pm_runtime_put_sync() Prabhakar
2026-09-11 11:27 ` sashiko-bot
2026-09-11 12:11 ` Lad, Prabhakar
2026-09-11 11:17 ` [PATCH v5 5/8] watchdog: rzv2h: Convert WDTDCR handling to regmap Prabhakar
2026-09-11 11:17 ` [PATCH v5 6/8] watchdog: rzv2h: Add syscon support for WDTDCR Prabhakar
2026-09-11 11:28 ` sashiko-bot
2026-09-11 11:39 ` Lad, Prabhakar
2026-09-11 11:17 ` [PATCH v5 7/8] arm64: dts: renesas: r9a09g077: Use CPG/MSSR syscon for WDTDCR access Prabhakar
2026-09-11 11:32 ` sashiko-bot [this message]
2026-09-11 12:08 ` Lad, Prabhakar
2026-09-11 11:17 ` [PATCH v5 8/8] arm64: dts: renesas: r9a09g087: " Prabhakar
2026-09-11 11:33 ` sashiko-bot
2026-09-11 12:09 ` Lad, Prabhakar
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=20260911113216.3810F1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.com \
/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