Linux clock framework development
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Val Packett <val@packett.cool>,
	Saravana Kannan <saravanak@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Maxime Ripard <mripard@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Bjorn Andersson <andersson@kernel.org>,
	Hans de Goede <johannes.goede@oss.qualcomm.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 2/4] clk: qcom: common: introduce qcom_cc_sync_state()
Date: Mon, 15 Jun 2026 10:48:09 -0400	[thread overview]
Message-ID: <ajAQqVB_knGO-bqL@redhat.com> (raw)
In-Reply-To: <68a86037-bba0-4cab-8a1f-b0be78f259db@oss.qualcomm.com>

Hi Konrad / Dmitry,

On Mon, Jun 15, 2026 at 04:33:17PM +0200, Konrad Dybcio wrote:
> On 6/15/26 4:24 PM, Brian Masney wrote:
> > On Sun, Jun 07, 2026 at 01:30:03PM +0300, Dmitry Baryshkov wrote:
> >> On Sun, Jun 07, 2026 at 01:43:06AM -0300, Val Packett wrote:
> >>>
> >>> On 6/6/26 8:15 AM, Dmitry Baryshkov wrote:
> >>>> On Wed, Jun 03, 2026 at 10:21:47AM -0400, Brian Masney wrote:
> >>>>> Several qcom clk providers currently have a sync_state helper set to
> >>>>> icc_sync_state(). With an upcoming change to the clk framework, if
> >>>>> sync_state is not defined for the device, then the clk framework sets it
> >>>>> to clk_sync_state().
> >>>>> [..]
> >>>>> @@ -464,5 +466,12 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index,
> >>>>>   }
> >>>>>   EXPORT_SYMBOL_GPL(qcom_cc_probe_by_index);
> >>>>> +void qcom_cc_sync_state(struct device *dev)
> >>>>> +{
> >>>>> +	icc_sync_state(dev);
> >>>> Only if desc->icc_hws != 0, otherwise it will mess the interconnect
> >>>> internals. You might need to set drvdata to desc.
> >>>
> >>> Hmm…
> >>>
> >>> Currently icc_sync_state does not seem to use the dev argument at all.
> >>>
> >>> How would something get messed up, now or whenever icc_sync_state changes?
> >>> o.0
> >>
> >> Yes :-(
> > 
> > Sorry about the delayed response since I was out of town all last week.
> > Just to be clear, the missing check for 'desc->icc_hws != 0' is a bug that
> > existed prior to my change, and I should label it as such with a Fixes
> > tag when I post my next version?
> 
> Up until this change, having icc_hws > 0 but lacking icc_sync_state
> (or the reverse) would be be considered programmer error

icc_hws > 0 but lacking icc_sync_state (or the reverse) makes sense as a
programmer error. However...

> Starting with patch 4, this gets assigned unconditionally, so there's
> no prior bug to be fixed

I don't see where that situation happens here. All of the places where
icc_sync_state() was previously called, the new code now calls
qcom_cc_sync_state() -> icc_sync_state(). (There is
qcom_msm8996_cbf_icc_sync_state() that needs to be modified.)

In patch 4 of this series, it sets up a framework level sync_state()
callback with dev_set_drv_sync_state(). If a sync_state already exists,
then that call will fail with -EBUSY, and it will leave the existing
sync_state() intact. So it's not calling sync_state twice. I will
clarify that on the comment.

Brian


  reply	other threads:[~2026-06-15 14:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 14:21 [PATCH 0/4] clk: implement sync_state support Brian Masney
2026-06-03 14:21 ` [PATCH 1/4] clk: introduce stub clk_sync_state() Brian Masney
2026-06-03 14:21 ` [PATCH 2/4] clk: qcom: common: introduce qcom_cc_sync_state() Brian Masney
2026-06-06 11:15   ` Dmitry Baryshkov
2026-06-07  4:43     ` Val Packett
2026-06-07 10:30       ` Dmitry Baryshkov
2026-06-15 14:24         ` Brian Masney
2026-06-15 14:33           ` Konrad Dybcio
2026-06-15 14:48             ` Brian Masney [this message]
2026-06-15 14:51               ` Konrad Dybcio
2026-06-15 15:04                 ` Brian Masney
2026-06-08  8:47   ` Konrad Dybcio
2026-06-03 14:21 ` [PATCH 3/4] clk: qcom: convert from icc_sync_state() to qcom_cc_sync_state() Brian Masney
2026-06-06  6:25   ` Jens Glathe
2026-06-15 14:22     ` Brian Masney
2026-06-15 14:50       ` Jens Glathe
2026-06-06 11:17   ` Dmitry Baryshkov
2026-06-03 14:21 ` [PATCH 4/4] clk: implement sync_state support Brian Masney

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=ajAQqVB_knGO-bqL@redhat.com \
    --to=bmasney@redhat.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=saravanak@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=val@packett.cool \
    /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