public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	agross@kernel.org, andersson@kernel.org
Cc: konrad.dybcio@linaro.org, mturquette@baylibre.com,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Amit Pundir <amit.pundir@linaro.org>
Subject: Re: [PATCH] clk: qcom: gfm-mux: use runtime pm while accessing registers
Date: Tue, 21 Mar 2023 15:48:48 -0700	[thread overview]
Message-ID: <ab6757652325303964d3de29f920befe.sboyd@kernel.org> (raw)
In-Reply-To: <4df4d530-f12a-cc34-692a-1f5ff784bbe5@linaro.org>

Quoting Srinivas Kandagatla (2023-03-21 13:33:49)
> 
> 
> On 21/03/2023 18:46, Stephen Boyd wrote:
> > Quoting Srinivas Kandagatla (2023-03-21 10:57:58)
> >> gfm mux driver does support runtime pm but we never use it while
> >> accessing registers. Looks like this driver was getting lucky and
> >> totally depending on other drivers to leave the clk on.
> >>
> >> Fix this by doing runtime pm while accessing registers.
> >>
> >> Fixes: a2d8f507803e ("clk: qcom: Add support to LPASS AUDIO_CC Glitch Free Mux clocks")
> >> Cc: stable@vger.kernel.org
> >> Reported-by: Amit Pundir <amit.pundir@linaro.org>
> > 
> > Is there a link to the report?
> 
> https://www.spinics.net/lists/stable/msg638380.html

Please add a Link: after the reported-by and use a lore link instead of
spinics please.

> >>   {
> >>          struct clk_gfm *clk = to_clk_gfm(hw);
> >>          unsigned int val;
> >> +       int ret;
> >> +
> >> +       ret = pm_runtime_resume_and_get(clk->priv->dev);
> > 
> > Doesn't the clk framework already do this? Why do we need to do it
> > again?
> 
> You are right, clk core already does do pm_runtime_resume_and_get for 
> set_parent.
> 
> this looks redundant here.
> 
> 
> so we need only need to add this for get_parent
> 

The get_parent() clk op is called from a couple places in the clk
framework. I guess that you're getting called from
clk_core_reparent_orphans() where the runtime PM count isn't
incremented? Can you confirm? Either way, this should be fixed in the
framework and not in the driver.

  reply	other threads:[~2023-03-21 22:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 17:57 [PATCH] clk: qcom: gfm-mux: use runtime pm while accessing registers Srinivas Kandagatla
2023-03-21 18:46 ` Stephen Boyd
2023-03-21 20:33   ` Srinivas Kandagatla
2023-03-21 22:48     ` Stephen Boyd [this message]
2023-03-22 10:06 ` Amit Pundir

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=ab6757652325303964d3de29f920befe.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=amit.pundir@linaro.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=srinivas.kandagatla@linaro.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