From: "Nuno Sá" <noname.nuno@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Herve Codina <herve.codina@bootlin.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Saravana Kannan <saravanak@google.com>,
Lizhi Hou <lizhi.hou@amd.com>, Max Zhen <max.zhen@amd.com>,
Sonal Santan <sonal.santan@amd.com>,
Stefano Stabellini <stefano.stabellini@xilinx.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Allan Nielsen <allan.nielsen@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Steen Hegelund <steen.hegelund@microchip.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Nuno Sa <nuno.sa@analog.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v6 1/2] driver core: Introduce device_link_wait_removal()
Date: Tue, 26 Mar 2024 08:05:37 +0100 [thread overview]
Message-ID: <ea13bc4f8a8aaf5b91ab3ca403533475000d5d87.camel@gmail.com> (raw)
In-Reply-To: <2024032554-tipoff-extrude-a631@gregkh>
On Mon, 2024-03-25 at 19:38 +0100, Greg Kroah-Hartman wrote:
> On Mon, Mar 25, 2024 at 04:21:25PM +0100, Herve Codina wrote:
> > The commit 80dd33cf72d1 ("drivers: base: Fix device link removal")
> > introduces a workqueue to release the consumer and supplier devices used
> > in the devlink.
> > In the job queued, devices are release and in turn, when all the
> > references to these devices are dropped, the release function of the
> > device itself is called.
> >
> > Nothing is present to provide some synchronisation with this workqueue
> > in order to ensure that all ongoing releasing operations are done and
> > so, some other operations can be started safely.
> >
> > For instance, in the following sequence:
> > 1) of_platform_depopulate()
> > 2) of_overlay_remove()
>
> So this is only an issue for overlays? Why has no one noticed this in
> the years since 80dd33cf72d1 was added? Why is this an issue now
> suddenly?
>
Not sure either... Note this is only an issue if device links are in place. So the
overlay needs to have nodes creating those links. You need to have regulators, pwm,
eth phy (at least these ones I'm aware they create links) to trigger this. We would
have to dig through git to understand when would this be noticeable. But note this is
very straight to trigger.
May also very well be that most people don't really "play" with overlay removal...
For example, I have been dealing with overlays on rpi's for the last 5 years and only
noticed this last year when we had an usecase that involved overlay removal.
- Nuno Sá
next prev parent reply other threads:[~2024-03-26 7:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 15:21 [PATCH v6 0/2] Synchronize DT overlay removal with devlink removals Herve Codina
2024-03-25 15:21 ` [PATCH v6 1/2] driver core: Introduce device_link_wait_removal() Herve Codina
2024-03-25 16:44 ` Rob Herring
2024-03-26 8:20 ` Greg Kroah-Hartman
2024-03-25 18:37 ` Greg Kroah-Hartman
2024-03-26 7:56 ` Herve Codina
2024-03-25 18:38 ` Greg Kroah-Hartman
2024-03-26 7:05 ` Nuno Sá [this message]
2024-03-25 15:21 ` [PATCH v6 2/2] of: dynamic: Synchronize of_changeset_destroy() with the devlink removals Herve Codina
2024-03-26 20:43 ` [PATCH v6 0/2] Synchronize DT overlay removal with " Rob Herring
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=ea13bc4f8a8aaf5b91ab3ca403533475000d5d87.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=allan.nielsen@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=herve.codina@bootlin.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=luca.ceresoli@bootlin.com \
--cc=max.zhen@amd.com \
--cc=nuno.sa@analog.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sonal.santan@amd.com \
--cc=stable@vger.kernel.org \
--cc=steen.hegelund@microchip.com \
--cc=stefano.stabellini@xilinx.com \
--cc=thomas.petazzoni@bootlin.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