From: Maxime Ripard <maxime@cerno.tech>
To: Stephen Boyd <sboyd@kernel.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
mturquette@baylibre.com, matthias.bgg@gmail.com,
chun-jie.chen@mediatek.com, miles.chen@mediatek.com,
wenst@chromium.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: mediatek: clk-mux: Add .determine_rate() callback
Date: Tue, 18 Oct 2022 09:06:53 +0200 [thread overview]
Message-ID: <20221018070653.gsvnacqe7chvzux2@houat> (raw)
In-Reply-To: <20221014193652.0C745C433D6@smtp.kernel.org>
Hi Stephen,
On Fri, Oct 14, 2022 at 12:36:50PM -0700, Stephen Boyd wrote:
> Quoting Maxime Ripard (2022-10-12 06:56:19)
> >
> > I think we need to address this in multiple ways:
> >
> > - If you have ftrace enabled on that platform, running with "tp_printk
> > trace_event=clk:*" in the kernel command line on a failing kernel would
> > be great, so that we can figure out what is happening exactly.
> >
> > - We really need to merge your patch above as well;
> >
> > - And, if we can, we should forbid to register a mux without a
> > determine_rate implementation. We have to take into account that some
> > muxes are going to be RO and won't need a determine_rate
> > implementation at all, but a clock with a set_parent and without a
> > determine_rate seems like a weird combination.
> >
>
> So should I apply this patch now on clk-next? Given this regression I'm
> leaning towards not sending off the clk rate request this merge window
> and letting it bake another cycle.
I saw that you sent the PR, thanks
We spent some time with Angelo yesterday debugging this, and it's still
not clear to me what happens.
He provided a significant amount of traces, and we first checked that
the round_rate part of set_rate was returning something meaningful, and
it does. The rate is fine, the parent is too, everything's great.
Next we checked the decisions by clk_calc_new_rates, and it does return
the proper top clock, and its proper rate.
Finally, we hooked into clk_change_rate() to see what kind of decision
it was enforcing, and it seems to be ok as well. It doesn't change
parent, and it sets the proper rate, in both cases.
There's still one thing we haven't checked: one of the clock in the tree
(the parent of the one we want to change the rate on, and it has
SET_RATE_PARENT) has a notifier. As we've had a bug recently over this
I've not ruled out that this could be a similar bug.
I don't really think it is though, since the notifier callback doesn't
use the data provided by the framework:
https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/clk/mediatek/clk-mux.c#L279
I've pushed a branch for Angelo to test, just to confirm.
So... yeah. I can't explain the regression at this point. Do you have an
idea?
The good news is, since you merged this patch the regression is
invisible now to that platform. We still could encounter it on another
platform, but maybe it will also have a more obvious setup to replicate?
Thanks!
Maxime
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-18 7:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 13:55 [PATCH v2] clk: mediatek: clk-mux: Add .determine_rate() callback AngeloGioacchino Del Regno
2022-10-12 8:55 ` Maxime Ripard
2022-10-12 9:09 ` AngeloGioacchino Del Regno
2022-10-12 9:40 ` Maxime Ripard
2022-10-12 9:57 ` AngeloGioacchino Del Regno
2022-10-12 11:48 ` Maxime Ripard
2022-10-12 12:14 ` AngeloGioacchino Del Regno
2022-10-12 13:56 ` Maxime Ripard
2022-10-12 16:42 ` Maxime Ripard
2022-10-12 16:52 ` Chen-Yu Tsai
2022-10-13 7:19 ` Maxime Ripard
2022-10-13 8:13 ` AngeloGioacchino Del Regno
2022-10-13 8:25 ` Maxime Ripard
2022-10-14 19:36 ` Stephen Boyd
2022-10-18 7:06 ` Maxime Ripard [this message]
2022-10-28 0:30 ` Stephen Boyd
2022-10-14 20:38 ` Stephen Boyd
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=20221018070653.gsvnacqe7chvzux2@houat \
--to=maxime@cerno.tech \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chun-jie.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=miles.chen@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=wenst@chromium.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