From: Stephen Boyd <sboyd@kernel.org>
To: Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Douglas Anderson <dianders@chromium.org>,
Sasha Levin <sashal@kernel.org>,
mturquette@baylibre.com, linux-clk@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.4 6/8] clk: Don't hold prepare_lock when calling kref_put()
Date: Tue, 23 Apr 2024 12:24:51 -0700 [thread overview]
Message-ID: <cc21ff5ddd8fbe07e75fdffd596c0aa1.sboyd@kernel.org> (raw)
In-Reply-To: <20240423110304.1659456-6-sashal@kernel.org>
Quoting Sasha Levin (2024-04-23 04:03:01)
> From: Stephen Boyd <sboyd@kernel.org>
>
> [ Upstream commit 6f63af7511e7058f3fa4ad5b8102210741c9f947 ]
>
> We don't need to hold the prepare_lock when dropping a ref on a struct
> clk_core. The release function is only freeing memory and any code with
> a pointer reference has already unlinked anything pointing to the
> clk_core. This reduces the holding area of the prepare_lock a bit.
>
> Note that we also don't call free_clk() with the prepare_lock held.
> There isn't any reason to do that.
You'll want the patch before this, 8358a76cfb47 ("clk: Remove
prepare_lock hold assertion in __clk_release()"), to avoid lockdep
warnings. And it looks like the problem was reported on v5.15.y so all
5 patches from the series would need a backport.
8358a76cfb47 clk: Remove prepare_lock hold assertion in __clk_release()
6f63af7511e7 clk: Don't hold prepare_lock when calling kref_put()
9d05ae531c2c clk: Initialize struct clk_core kref earlier
e581cf5d2162 clk: Get runtime PM before walking tree during disable_unused
9d1e795f754d clk: Get runtime PM before walking tree for clk_summary
next prev parent reply other threads:[~2024-04-23 19:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240423110304.1659456-1-sashal@kernel.org>
2024-04-23 11:03 ` [PATCH AUTOSEL 5.4 6/8] clk: Don't hold prepare_lock when calling kref_put() Sasha Levin
2024-04-23 19:24 ` Stephen Boyd [this message]
2024-05-08 10:16 ` Sasha Levin
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=cc21ff5ddd8fbe07e75fdffd596c0aa1.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=dianders@chromium.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sashal@kernel.org \
--cc=stable@vger.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).