[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <jhdl6aqh7cbb4t6uqhafxcgn4efxn3tzqo7haivle6olkpmvxf@yafk363lady4>
Date: Sat, 20 Dec 2025 03:17:06 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Christopher Obbard <christopher.obbard@...aro.org>
Cc: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Bjorn Andersson <andersson@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Dmitry Baryshkov <lumag@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] Revert "clk: qcom: cpu-8996: simplify the
cpu_clk_notifier_cb"
On Fri, Dec 19, 2025 at 08:50:58PM +0000, Christopher Obbard wrote:
> Hi Dmitry, Konrad,
>
> On Thu, 18 Dec 2025 at 13:33, Dmitry Baryshkov
> <dmitry.baryshkov@....qualcomm.com> wrote:
> >
> > On Thu, 18 Dec 2025 at 15:09, Konrad Dybcio
> > <konrad.dybcio@....qualcomm.com> wrote:
> > >
> > > On 12/17/25 5:39 PM, Dmitry Baryshkov wrote:
> > > > On Wed, Dec 17, 2025 at 01:22:59PM +0100, Konrad Dybcio wrote:
> > > >> On 12/14/25 8:26 PM, Christopher Obbard wrote:
> > > >>> Hi Konrad,
> > > >>>
> > > >>> On Mon, 8 Dec 2025 at 22:36, Christopher Obbard
> > > >>> <christopher.obbard@...aro.org> wrote:
> > > >>>> Apologies for the late response, I was in the process of setting some
> > > >>>> more msm8096 boards up again in my new workspace to test this
> > > >>>> properly.
> > > >>>>
> > > >>>>
> > > >>>>> It may be that your board really has a MSM/APQ8x96*SG* which is another
> > > >>>>> name for the PRO SKU, which happens to have a 2 times wider divider, try
> > > >>>>>
> > > >>>>> `cat /sys/bus/soc/devices/soc0/soc_id`
> > > >>>>
> > > >>>> I read the soc_id from both of the msm8096 boards I have:
> > > >>>>
> > > >>>> Open-Q™ 820 µSOM Development Kit (APQ8096)
> > > >>>> ```
> > > >>>> $ cat /sys/bus/soc/devices/soc0/soc_id
> > > >>>> 291
> > > >>>> ```
> > > >>>> (FWIW this board is not in mainline yet; but boots with a DT similar
> > > >>>> enough to the db820c. I have a patch in my upstream backlog enabling
> > > >>>> that board; watch this space)
> > > >>>>
> > > >>>> DragonBoard™ 820c (APQ8096)
> > > >>>> ```
> > > >>>> $ cat /sys/bus/soc/devices/soc0/soc_id
> > > >>>> 291
> > > >>>> ```
> > > >>>
> > > >>> Sorry to nag, but are you able to look into this soc_id and see if
> > > >>> it's the PRO SKU ?
> > > >>
> > > >> No, it's the "normal" one
> > > >>
> > > >> Maybe Dmitry would know a little more what's going on
> > > >
> > > > Unfortunately, no.
> > > >
> > > > Maybe, the best option would be to really land the revert.
> > > >
> > > >
> > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> > >
> > > Is there a chance that this removal:
> > >
> > > - case POST_RATE_CHANGE:
> > > - if (cnd->new_rate < DIV_2_THRESHOLD)
> > > - ret = clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw,
> > > - SMUX_INDEX);
> > > - else
> > > - ret = clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw,
> > > - ACD_INDEX);
> > >
> > > could have been the cause?
> > >
> > > On one hand, we're removing this explicit "set ACD as parent" path, but
> > > OTOH determine_rate should have taken care of this..
> >
> > My idea was that we switch to SMUX temporarily, then CLK framework
> > fixes that for us while performing the actual reparenting.
> >
> > Christopher, as a quick check, could possibly revert just this chunk?
>
> Do you mean something like this diff? I thought I'd ask and confirm
> first, to be really sure.
> This leaves the handlers present for the other two events
> (PRE_RATE_CHANGE and ABORT_RATE_CHANGE).
> I didn't bother checking the calls to clk_cpu_8996_pmux_set_parent for
> errors as it's just a quick hack.
> If you think this diff is good for a test, I will check it in the next few days.
Yes, something like this.
>
> diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c
> index 21d13c0841ed0..5d7f42a86a923 100644
> --- a/drivers/clk/qcom/clk-cpu-8996.c
> +++ b/drivers/clk/qcom/clk-cpu-8996.c
> @@ -565,6 +565,14 @@ static int cpu_clk_notifier_cb(struct
> notifier_block *nb, unsigned long event,
> clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw,
> SMUX_INDEX);
>
> break;
> + case POST_RATE_CHANGE:
> + if (cnd->new_rate < DIV_2_THRESHOLD)
> + clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw,
> + SMUX_INDEX);
> + else
> + clk_cpu_8996_pmux_set_parent(&cpuclk->clkr.hw,
> + ACD_INDEX);
> + break;
> case ABORT_RATE_CHANGE:
> /* Revert manual change */
> if (cnd->new_rate < DIV_2_THRESHOLD &&
>
>
> Cheers!
>
> Christopher Obbard
--
With best wishes
Dmitry
Powered by blists - more mailing lists