From: Stephen Boyd <sboyd@kernel.org>
To: Cristian Marussi <cristian.marussi@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com,
f.fainelli@gmail.com, vincent.guittot@linaro.org,
peng.fan@oss.nxp.com, michal.simek@amd.com,
quic_sibis@quicinc.com, quic_nkela@quicinc.com,
souvik.chakravarty@arm.com,
Cristian Marussi <cristian.marussi@arm.com>,
Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org
Subject: Re: [PATCH 6/7] clk: scmi: Allocate CLK operations dynamically
Date: Wed, 21 Feb 2024 21:44:14 -0800 [thread overview]
Message-ID: <500e265eb7c6a03a40e0067c8806e059.sboyd@kernel.org> (raw)
In-Reply-To: <20240214183006.3403207-7-cristian.marussi@arm.com>
Quoting Cristian Marussi (2024-02-14 10:30:05)
> diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
> index 5747b6d651f0..b91a0dbd2fe0 100644
> --- a/drivers/clk/clk-scmi.c
> +++ b/drivers/clk/clk-scmi.c
> @@ -158,51 +158,6 @@ static int scmi_clk_atomic_is_enabled(struct clk_hw *hw)
> return !!enabled;
> }
>
> -/*
> - * We can provide enable/disable/is_enabled atomic callbacks only if the
> - * underlying SCMI transport for an SCMI instance is configured to handle
> - * SCMI commands in an atomic manner.
> - *
> - * When no SCMI atomic transport support is available we instead provide only
> - * the prepare/unprepare API, as allowed by the clock framework when atomic
> - * calls are not available.
> - *
> - * Two distinct sets of clk_ops are provided since we could have multiple SCMI
> - * instances with different underlying transport quality, so they cannot be
> - * shared.
> - */
> -static const struct clk_ops scmi_clk_ops = {
> - .recalc_rate = scmi_clk_recalc_rate,
> - .round_rate = scmi_clk_round_rate,
> - .set_rate = scmi_clk_set_rate,
> - .prepare = scmi_clk_enable,
> - .unprepare = scmi_clk_disable,
> - .set_parent = scmi_clk_set_parent,
> - .get_parent = scmi_clk_get_parent,
> - .determine_rate = scmi_clk_determine_rate,
> -};
> -
> -static const struct clk_ops scmi_atomic_clk_ops = {
It's not great to move these function pointer structs out of RO memory
to RW. I'm also not convinced that it's any better to construct them at
runtime. Isn't there a constant set of possible clk configurations? Or
why can't we simply add some failures to the clk_ops functions instead?
> - .recalc_rate = scmi_clk_recalc_rate,
> - .round_rate = scmi_clk_round_rate,
> - .set_rate = scmi_clk_set_rate,
> - .enable = scmi_clk_atomic_enable,
> - .disable = scmi_clk_atomic_disable,
> - .is_enabled = scmi_clk_atomic_is_enabled,
_______________________________________________
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:[~2024-02-22 5:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 18:29 [PATCH 0/7] SCMI V3.2 Misc updates Cristian Marussi
2024-02-14 18:30 ` [PATCH 1/7] firmware: arm_scmi: Add a common helper to check if a message is supported Cristian Marussi
2024-02-14 18:30 ` [PATCH 2/7] firmware: arm_scmi: Add support for v3.2 NEGOTIATE_PROTOCOL_VERSION Cristian Marussi
2024-02-14 18:30 ` [PATCH 3/7] firmware: arm_scmi: Add Clock check for extended config support Cristian Marussi
2024-02-14 18:30 ` [PATCH 4/7] firmware: arm_scmi: Add standard Clock OEM definitions Cristian Marussi
2024-02-14 18:30 ` [PATCH 5/7] firmware: arm_scmi: Update supported Clock protocol version Cristian Marussi
2024-02-14 18:30 ` [PATCH 6/7] clk: scmi: Allocate CLK operations dynamically Cristian Marussi
2024-02-22 5:44 ` Stephen Boyd [this message]
2024-02-22 8:28 ` Cristian Marussi
2024-02-29 2:20 ` Stephen Boyd
2024-02-29 10:09 ` Cristian Marussi
2024-02-14 18:30 ` [PATCH 7/7] clk: scmi: Support get/set duty_cycle operations Cristian Marussi
2024-02-22 5:44 ` Stephen Boyd
2024-02-22 9:37 ` (subset) [PATCH 0/7] SCMI V3.2 Misc updates Sudeep Holla
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=500e265eb7c6a03a40e0067c8806e059.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=mturquette@baylibre.com \
--cc=peng.fan@oss.nxp.com \
--cc=quic_nkela@quicinc.com \
--cc=quic_sibis@quicinc.com \
--cc=souvik.chakravarty@arm.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).