From: Stephen Boyd <sboyd@kernel.org>
To: Chuan Liu via B4 Relay <devnull+chuan.liu.amlogic.com@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
chuan.liu@amlogic.com
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Chuan Liu <chuan.liu@amlogic.com>
Subject: Re: [PATCH] clk: Fix invalid execution of clk_set_rate
Date: Thu, 14 Nov 2024 15:17:19 -0800 [thread overview]
Message-ID: <0ea59af3c891859681cac378eaface75.sboyd@kernel.org> (raw)
In-Reply-To: <20240910-fix_clk-v1-1-111443baaeaa@amlogic.com>
Quoting Chuan Liu via B4 Relay (2024-09-09 22:53:44)
> From: Chuan Liu <chuan.liu@amlogic.com>
>
> Some clocks have rates that can be changed elsewhere, so add a flag
> CLK_GET_RATE_NOCACHE(such as scmi_clk) to these clocks to ensure that
> the real-time rate is obtained.
>
> When clk_set_rate is called, it is returned if the request to set rate
> is consistent with the current rate. Getting the current rate in
> clk_set_rate returns the rate stored in clk_core. CLK_GET_RATE_NOCACHE
> does not take effect here.
>
> Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
This looks obviously correct but I'm worried that it will cause some
problem somewhere. It would be nice if there were some kunit tests
associated with this. The worst case situation is that we recalc rates
if the CLK_GET_RATE_NOCACHE flag is set, right? I guess I'll just apply
this as a cleanup for the next merge window and see if it causes
problems for anyone.
next prev parent reply other threads:[~2024-11-14 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 5:53 Chuan Liu via B4 Relay
2024-11-14 23:17 ` Stephen Boyd [this message]
2024-11-28 15:55 ` Aishwarya TCV
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=0ea59af3c891859681cac378eaface75.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=chuan.liu@amlogic.com \
--cc=devnull+chuan.liu.amlogic.com@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
/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
all inboxes | Powered by JetHome®