From: Ulf Hansson <ulf.hansson@linaro.org> To: Sudeep Holla <sudeep.holla@arm.com>, Cristian Marussi <cristian.marussi@arm.com>, Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org> Cc: Nikunj Kela <nkela@quicinc.com>, Prasad Sodagudi <psodagud@quicinc.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains Date: Fri, 25 Aug 2023 13:26:21 +0200 [thread overview] Message-ID: <20230825112633.236607-2-ulf.hansson@linaro.org> (raw) In-Reply-To: <20230825112633.236607-1-ulf.hansson@linaro.org> Similar to other protocol ops, it's useful for an scmi module driver to get the number of supported performance domains, hence let's make this available by adding a new perf protocol callback. Note that, a user is being added from subsequent changes. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- Changes in v3: - Re-based. --- drivers/firmware/arm_scmi/perf.c | 8 ++++++++ include/linux/scmi_protocol.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index c0cd556fbaae..9fb63dd44c20 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -423,6 +423,13 @@ scmi_perf_describe_levels_get(const struct scmi_protocol_handle *ph, return ret; } +static int scmi_perf_num_domains_get(const struct scmi_protocol_handle *ph) +{ + struct scmi_perf_info *pi = ph->get_priv(ph); + + return pi->num_domains; +} + static int scmi_perf_msg_limits_set(const struct scmi_protocol_handle *ph, u32 domain, u32 max_perf, u32 min_perf) { @@ -948,6 +955,7 @@ scmi_power_scale_get(const struct scmi_protocol_handle *ph) } static const struct scmi_perf_proto_ops perf_proto_ops = { + .num_domains_get = scmi_perf_num_domains_get, .limits_set = scmi_perf_limits_set, .limits_get = scmi_perf_limits_get, .level_set = scmi_perf_level_set, diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index e6fe4f73ffe6..71b39cbbdace 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -101,6 +101,7 @@ struct scmi_clk_proto_ops { * struct scmi_perf_proto_ops - represents the various operations provided * by SCMI Performance Protocol * + * @num_domains_get: gets the number of supported performance domains * @limits_set: sets limits on the performance level of a domain * @limits_get: gets limits on the performance level of a domain * @level_set: sets the performance level of a domain @@ -120,6 +121,7 @@ struct scmi_clk_proto_ops { * or in some other (abstract) scale */ struct scmi_perf_proto_ops { + int (*num_domains_get)(const struct scmi_protocol_handle *ph); int (*limits_set)(const struct scmi_protocol_handle *ph, u32 domain, u32 max_perf, u32 min_perf); int (*limits_get)(const struct scmi_protocol_handle *ph, u32 domain, -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org> To: Sudeep Holla <sudeep.holla@arm.com>, Cristian Marussi <cristian.marussi@arm.com>, Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org> Cc: Nikunj Kela <nkela@quicinc.com>, Prasad Sodagudi <psodagud@quicinc.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains Date: Fri, 25 Aug 2023 13:26:21 +0200 [thread overview] Message-ID: <20230825112633.236607-2-ulf.hansson@linaro.org> (raw) In-Reply-To: <20230825112633.236607-1-ulf.hansson@linaro.org> Similar to other protocol ops, it's useful for an scmi module driver to get the number of supported performance domains, hence let's make this available by adding a new perf protocol callback. Note that, a user is being added from subsequent changes. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- Changes in v3: - Re-based. --- drivers/firmware/arm_scmi/perf.c | 8 ++++++++ include/linux/scmi_protocol.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index c0cd556fbaae..9fb63dd44c20 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -423,6 +423,13 @@ scmi_perf_describe_levels_get(const struct scmi_protocol_handle *ph, return ret; } +static int scmi_perf_num_domains_get(const struct scmi_protocol_handle *ph) +{ + struct scmi_perf_info *pi = ph->get_priv(ph); + + return pi->num_domains; +} + static int scmi_perf_msg_limits_set(const struct scmi_protocol_handle *ph, u32 domain, u32 max_perf, u32 min_perf) { @@ -948,6 +955,7 @@ scmi_power_scale_get(const struct scmi_protocol_handle *ph) } static const struct scmi_perf_proto_ops perf_proto_ops = { + .num_domains_get = scmi_perf_num_domains_get, .limits_set = scmi_perf_limits_set, .limits_get = scmi_perf_limits_get, .level_set = scmi_perf_level_set, diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index e6fe4f73ffe6..71b39cbbdace 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -101,6 +101,7 @@ struct scmi_clk_proto_ops { * struct scmi_perf_proto_ops - represents the various operations provided * by SCMI Performance Protocol * + * @num_domains_get: gets the number of supported performance domains * @limits_set: sets limits on the performance level of a domain * @limits_get: gets limits on the performance level of a domain * @level_set: sets the performance level of a domain @@ -120,6 +121,7 @@ struct scmi_clk_proto_ops { * or in some other (abstract) scale */ struct scmi_perf_proto_ops { + int (*num_domains_get)(const struct scmi_protocol_handle *ph); int (*limits_set)(const struct scmi_protocol_handle *ph, u32 domain, u32 max_perf, u32 min_perf); int (*limits_get)(const struct scmi_protocol_handle *ph, u32 domain, -- 2.34.1
next prev parent reply other threads:[~2023-08-25 11:27 UTC|newest] Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson [this message] 2023-08-25 11:26 ` [PATCH v3 01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains Ulf Hansson 2023-08-25 11:26 ` [PATCH v3 02/13] firmware: arm_scmi: Extend perf protocol ops to get information of a domain Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-08-25 11:26 ` [PATCH v3 03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 14:28 ` Viresh Kumar 2023-09-21 14:28 ` Viresh Kumar 2023-08-25 11:26 ` [PATCH v3 04/13] firmware: arm_scmi: Align perf ops to use domain-id as in-parameter Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 14:29 ` Viresh Kumar 2023-09-21 14:29 ` Viresh Kumar 2023-08-25 11:26 ` [PATCH v3 05/13] firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-08-25 11:26 ` [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus() Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 14:29 ` Viresh Kumar 2023-09-21 14:29 ` Viresh Kumar 2023-08-25 11:26 ` [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe() Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 11:14 ` Sudeep Holla 2023-09-21 11:14 ` Sudeep Holla 2023-09-21 13:02 ` Ulf Hansson 2023-09-21 13:02 ` Ulf Hansson 2023-09-21 13:29 ` Sudeep Holla 2023-09-21 13:29 ` Sudeep Holla 2023-08-25 11:26 ` [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-11 13:20 ` Rob Herring 2023-09-11 13:20 ` Rob Herring 2023-09-21 11:11 ` Sudeep Holla 2023-09-21 11:11 ` Sudeep Holla 2023-09-21 13:22 ` Ulf Hansson 2023-09-21 13:22 ` Ulf Hansson 2023-09-21 13:35 ` Sudeep Holla 2023-09-21 13:35 ` Sudeep Holla 2023-08-25 11:26 ` [PATCH v3 09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13 Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-11 13:20 ` Rob Herring 2023-09-11 13:20 ` Rob Herring 2023-08-25 11:26 ` [PATCH v3 10/13] dt-bindings: power: Clarify performance capabilities of power-domains Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-11 14:40 ` Rob Herring 2023-09-11 14:40 ` Rob Herring 2023-08-25 11:26 ` [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 11:17 ` Sudeep Holla 2023-09-21 11:17 ` Sudeep Holla 2023-09-21 14:30 ` Viresh Kumar 2023-09-21 14:30 ` Viresh Kumar 2023-08-25 11:26 ` [PATCH v3 12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-21 11:20 ` Sudeep Holla 2023-09-21 11:20 ` Sudeep Holla 2023-09-21 13:05 ` Ulf Hansson 2023-09-21 13:05 ` Ulf Hansson 2023-09-21 13:30 ` Sudeep Holla 2023-09-21 13:30 ` Sudeep Holla 2023-08-25 11:26 ` [PATCH v3 13/13] genpd: arm: Add the SCMI performance domain Ulf Hansson 2023-08-25 11:26 ` Ulf Hansson 2023-09-14 22:45 ` [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson 2023-09-14 22:45 ` Ulf Hansson 2023-09-18 10:26 ` Sudeep Holla 2023-09-18 10:26 ` Sudeep Holla 2023-09-19 10:24 ` Ulf Hansson 2023-09-19 10:24 ` Ulf Hansson 2023-09-25 9:39 ` Sudeep Holla 2023-09-25 9:39 ` 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=20230825112633.236607-2-ulf.hansson@linaro.org \ --to=ulf.hansson@linaro.org \ --cc=alexandre.torgue@foss.st.com \ --cc=cristian.marussi@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=nkela@quicinc.com \ --cc=nm@ti.com \ --cc=psodagud@quicinc.com \ --cc=sboyd@kernel.org \ --cc=sudeep.holla@arm.com \ --cc=vireshk@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.