From: Philipp Zabel <p.zabel@pengutronix.de>
To: Steven Price <steven.price@arm.com>
Cc: linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH] reset: use a shared SRCU domain for reset controls
Date: Thu, 23 Apr 2026 12:27:12 +0200 [thread overview]
Message-ID: <e975712ff8e3c7af4b7b59ca5502f3ad405995fe.camel@pengutronix.de> (raw)
In-Reply-To: <20260417154809.1984386-1-steven.price@arm.com>
Hi Steven,
On Fr, 2026-04-17 at 16:48 +0100, Steven Price wrote:
> Commit 78ebbff6d1a0 ("reset: handle removing supplier before consumers")
> added a dynamically initialized srcu_struct to every reset_control and
> cleaned it up again when the handle was dropped.
>
> That breaks early boot users which acquire and release reset handles
> before workqueues are online. On rk3288 this shows up during
> rockchip_smp_prepare_cpus(), where pmu_set_power_domain() gets a reset
> control for a CPU core and then drops it again before SMP bring-up has
> finished.
Can the reset_control_put() call be dropped from pmu_set_power_domain()
to fix the problem?
Putting the reset control should mean that the driver doesn't care
about the state of the reset line anymore, but the platsmp code very
much expects the reset line to stay deasserted after enabling a CPU.
Acquiring reset controls in rockchip_smp_prepare_cpus() once and never
giving them up via reset_control_put() seems like a correct fix,
regardless of whether this patch is applied or not.
It looks like the meson platsmp suffers from the same issue.
> cleanup_srcu_struct() then tries to flush delayed SRCU work
> and hits the WARN_ON(!wq_online) path, which can leave the machine
> hanging before the serial console appears.
>
> Keep the supplier-removal protection, but move it to a single shared
> static SRCU domain for the reset core. That preserves the rcdev lifetime
> protection needed for supplier unregister without requiring per-handle
> init_srcu_struct()/cleanup_srcu_struct() on normal get/put paths.
I'd prefer to document the workqueue requirement and keep the SRCU
domain per reset_control, if possible.
regards
Philipp
next prev parent reply other threads:[~2026-04-23 10:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 15:48 Steven Price
2026-04-20 8:18 ` Steven Price
2026-04-23 10:27 ` Philipp Zabel [this message]
2026-04-23 12:45 ` Steven Price
2026-04-23 14:15 ` Philipp Zabel
2026-04-24 9:04 ` Steven Price
2026-05-14 9:07 ` Steven Price
2026-05-21 21:15 ` Heiko Stuebner
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=e975712ff8e3c7af4b7b59ca5502f3ad405995fe.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=steven.price@arm.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
all inboxes | Powered by JetHome®