Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Ulf Hansson" <ulf.hansson@oss.qualcomm.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ulf Hansson <ulfh@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Troy Mitchell <troy.mitchell@linux.spacemit.com>,
	Yixun Lan <dlan@kernel.org>, Paul Walmsley <pjw@kernel.org>,
	spacemit@lists.linux.dev, linux-riscv@lists.infradead.org
Subject: Re: [PATCH] pmdomain: core: connect consumer with supplier via device link
Date: Fri, 04 Dec 2026 05:51:53 +0000	[thread overview]
Message-ID: <DNBPPXJ9EX1J.KI844SAGT596@linux.spacemit.com> (raw)
In-Reply-To: <CAPx+jO9+5r-1Qes+euXM+vJY8MhT0dMhw-vYj=Z59KONjj0f2Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 726 bytes --]

Hi Ulf,

On Wed, 2 Dec 2026 17:09:44 +0100, Ulf Hansson wrote:
> > +       device_link_add(dev, &pd->dev, DL_FLAG_AUTOREMOVE_CONSUMER);
>
> To properly track the consumer, we need to use base_dev instead of
> dev, as dev may be the virtual device that is created when attaching
> by genpd_dev_pm_attach_by_id().

base_dev makes sense, but the consumer is then unbound from
device_del(&pd->dev) in of_genpd_del_provider(), under gpd_list_lock.
A consumer that is itself a genpd provider takes that lock again in its
remove, e.g. imx8m_blk_ctrl_remove() (disp_blk_ctrl consumes
pgc_dispmix on imx8mm), so unbinding imx-pgc deadlocks.

The return value of device_link_add() is also ignored.

-- 
Troy Mitchell

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2026-12-04  5:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  7:45 [PATCH] pmdomain: core: connect consumer with supplier via device link Yixun Lan
2026-11-14 11:33 ` Ulf Hansson
2026-11-16  7:24   ` Yixun Lan
2026-11-16  7:46     ` Icenowy Zheng
2026-11-25 10:34       ` Ulf Hansson
2026-12-01 19:33 ` Stefan Dösinger
2026-12-02 16:09 ` Ulf Hansson
2026-12-04  5:51   ` Troy Mitchell [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=DNBPPXJ9EX1J.KI844SAGT596@linux.spacemit.com \
    --to=troy.mitchell@linux.spacemit.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dlan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=ulf.hansson@oss.qualcomm.com \
    --cc=ulfh@kernel.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