diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2023-08-25 13:26:24 +0200 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2023-09-21 16:24:27 +0100 |
commit | 39dfa5b9e1f0fa63b811a0a87f1c2fb9c76a0456 (patch) | |
tree | 6d160b4d7e2ecd532b0aa9817cc3b02abbef7064 /include/linux/scmi_protocol.h | |
parent | e336baa4193ecc788a06c0c4659e400bb53689b4 (diff) | |
download | lwn-39dfa5b9e1f0fa63b811a0a87f1c2fb9c76a0456.tar.gz lwn-39dfa5b9e1f0fa63b811a0a87f1c2fb9c76a0456.zip |
firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
Most scmi_perf_proto_ops are already using an "u32 domain" as an
in-parameter to indicate what performance domain we shall operate upon.
However, some of the ops are using a "struct device *dev", which means that
an additional OF parsing is needed each time the perf ops gets called, to
find the corresponding domain-id.
To avoid the above, but also to make the code more consistent, let's
replace the in-parameter "struct device *dev" with an "u32 domain". Note
that, this requires us to make some corresponding changes to the scmi
cpufreq driver, so let's do that too.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-5-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scmi_protocol.h')
-rw-r--r-- | include/linux/scmi_protocol.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 9108fe8ed3e3..4e63766adc6f 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -149,9 +149,9 @@ struct scmi_perf_proto_ops { u32 *level, bool poll); int (*device_domain_id)(struct device *dev); int (*transition_latency_get)(const struct scmi_protocol_handle *ph, - struct device *dev); + u32 domain); int (*device_opps_add)(const struct scmi_protocol_handle *ph, - struct device *dev); + struct device *dev, u32 domain); int (*freq_set)(const struct scmi_protocol_handle *ph, u32 domain, unsigned long rate, bool poll); int (*freq_get)(const struct scmi_protocol_handle *ph, u32 domain, @@ -159,7 +159,7 @@ struct scmi_perf_proto_ops { int (*est_power_get)(const struct scmi_protocol_handle *ph, u32 domain, unsigned long *rate, unsigned long *power); bool (*fast_switch_possible)(const struct scmi_protocol_handle *ph, - struct device *dev); + u32 domain); enum scmi_power_scale (*power_scale_get)(const struct scmi_protocol_handle *ph); }; |