From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: clock: airoha: Add additional reset for PCIe PERSTOUT
Date: Thu, 23 Jul 2026 19:10:37 +0000 [thread overview]
Message-ID: <20260723191037.D56FC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723190133.22577-1-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unprotected read-modify-write race condition in `en7523_reset_update()`
--
--- Patch [1]: [PATCH 1/2] dt-bindings: clock: airoha: Add additional reset for PCIe PERSTOUT ---
commit 18436d020bf626a2783583bd282cd113ebcf4808
Author: Christian Marangi <ansuelsmth@gmail.com>
dt-bindings: clock: airoha: Add additional reset for PCIe PERSTOUT
This commit adds three new reset identifiers for PCIe PERSTOUT lines to the
Airoha EN7581 reset bindings.
> diff --git a/include/dt-bindings/reset/airoha,en7581-reset.h b/include/dt-bindings/reset/airoha,en7581-reset.h
> index 6544a1790b83b..25e75534daa94 100644
> --- a/include/dt-bindings/reset/airoha,en7581-reset.h
> +++ b/include/dt-bindings/reset/airoha,en7581-reset.h
> @@ -62,5 +62,9 @@
> #define EN7581_CPU_TIMER_RST 50
> #define EN7581_PCIE_HB_RST 51
> #define EN7581_XPON_MAC_RST 52
> +/* RST_PCIC */
> +#define EN7581_PCIC_PERSTOUT0_RST 53
> +#define EN7581_PCIC_PERSTOUT1_RST 54
> +#define EN7581_PCIC_PERSTOUT2_RST 55
[Severity: High]
This is a pre-existing issue, but does adding these new reset lines expose a
race condition in the driver's reset handler?
Looking at en7523_reset_update() in drivers/clk/clk-en7523.c, the code
performs an unprotected read-modify-write on the shared reset register:
drivers/clk/clk-en7523.c:en7523_reset_update() {
...
val = readl(addr);
if (assert)
val |= BIT(id % RST_NR_PER_BANK);
else
val &= ~BIT(id % RST_NR_PER_BANK);
writel(val, addr);
...
}
If two independent consumer drivers call reset_control_assert() or
reset_control_deassert() concurrently for different reset IDs that reside in
the same 32-bit register bank, can one of the updates be silently dropped?
Since the reset framework delegates hardware-level locking to the provider
driver, it seems a spinlock is needed here to prevent concurrent updates
from clobbering each other, which might leave a device permanently in reset
or prematurely pull it out of reset.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723190133.22577-1-ansuelsmth@gmail.com?part=1
prev parent reply other threads:[~2026-07-23 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 19:01 [PATCH 1/2] dt-bindings: clock: airoha: Add additional reset for PCIe PERSTOUT Christian Marangi
2026-07-23 19:01 ` [PATCH 2/2] clk: en7523: add support for dedicated PCIe PERSTOUT reset Christian Marangi
2026-07-23 19:15 ` sashiko-bot
2026-07-23 19:10 ` sashiko-bot [this message]
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=20260723191037.D56FC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--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.