linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support
@ 2023-08-25 11:26 Ulf Hansson
  2023-08-25 11:26 ` [PATCH v3 01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains Ulf Hansson
                   ` (14 more replies)
  0 siblings, 15 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

Changes in v3:
	- Re-based upon the for-next/scmi/updates branch.
	- Re-ordered some of the patches in the series, to eas review.
	- Added some new DT doc patches in the series, according to comments.
	- Fixed other comments, see version history for each patch.

Changes in v2:
	- Split up the series, to get the basic support in place as the first
	step. The part that remains is the integration with the OPP library, to
	allow consumer drivers to change performance level using the OPP lib.
	- Re-based on top v6.5-rc1.
	- Other changes will be described for each patch.

The current SCMI performance scaling support is limited to cpufreq. This series
extends the support, so it can be used for all kind of devices and not only for
CPUs.

The changes are spread over a couple of different subsystems, although the
changes that affects the other subsystems than the arm_scmi directory are
mostly smaller, except for last patch which is in the new genpd directory.

The series is based upon the for-next/scmi/updates branch, but to enable the
genpd provider in patch 13 (the actual scmi performance domain driver) to be
placed in the new genpd directory, I have also merged an immutable branch [1],
which is queued for v6.6.

Note that, I am runing this on the Qemu virt platform with Optee running an SCMI
server. If you want some more details about my test setup, I can share this with
you, just let me know.

Looking forward to your feedback!

Kind regards
Ulf Hansson

[1]
git.kernel.org/pub/scm/linux/kernel/git/people/ulf.hansson/linux-pm.git genpd_create_dir


Ulf Hansson (13):
  firmware: arm_scmi: Extend perf protocol ops to get number of domains
  firmware: arm_scmi: Extend perf protocol ops to get information of a
    domain
  cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
  firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
  firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
  cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
  cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
  dt-bindings: arm: cpus: Add a power-domain-name for a
    performance-domain
  dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
  dt-bindings: power: Clarify performance capabilities of power-domains
  cpufreq: scmi: Add support to parse domain-id using
    #power-domain-cells
  PM: domains: Allow genpd providers to manage OPP tables directly by
    its FW
  genpd: arm: Add the SCMI performance domain

 .../devicetree/bindings/arm/cpus.yaml         |   4 +-
 .../bindings/firmware/arm,scmi.yaml           |  11 +-
 .../bindings/power/power-domain.yaml          |  17 +-
 MAINTAINERS                                   |   1 +
 drivers/base/power/domain.c                   |  11 +-
 drivers/cpufreq/scmi-cpufreq.c                |  55 +++++--
 drivers/firmware/arm_scmi/Kconfig             |  12 ++
 drivers/firmware/arm_scmi/perf.c              |  90 +++++------
 drivers/genpd/Makefile                        |   1 +
 drivers/genpd/arm/Makefile                    |   3 +
 drivers/genpd/arm/scmi_perf_domain.c          | 150 ++++++++++++++++++
 include/linux/pm_domain.h                     |   5 +
 include/linux/scmi_protocol.h                 |  18 ++-
 13 files changed, 293 insertions(+), 85 deletions(-)
 create mode 100644 drivers/genpd/arm/Makefile
 create mode 100644 drivers/genpd/arm/scmi_perf_domain.c

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains
  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 ` [PATCH v3 02/13] firmware: arm_scmi: Extend perf protocol ops to get information of a domain Ulf Hansson
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 02/13] firmware: arm_scmi: Extend perf protocol ops to get information of a domain
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
  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 ` 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
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

Similar to other protocol ops, it's useful for an scmi module driver to get
some generic information of a performance domain. Therefore, let's add a
new callback to provide this information. The information is currently
limited to the name of the performance domain and whether the set-level
operation is supported, although this can easily be extended if we find the
need for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- Re-based.

---
 drivers/firmware/arm_scmi/perf.c | 47 ++++++++++++++++++++------------
 include/linux/scmi_protocol.h    |  8 ++++++
 2 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 9fb63dd44c20..d20bb6b8abfa 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -145,7 +145,6 @@ struct scmi_msg_resp_perf_describe_levels_v4 {
 struct perf_dom_info {
 	u32 id;
 	bool set_limits;
-	bool set_perf;
 	bool perf_limit_notify;
 	bool perf_level_notify;
 	bool perf_fastchannels;
@@ -154,7 +153,7 @@ struct perf_dom_info {
 	u32 sustained_freq_khz;
 	u32 sustained_perf_level;
 	u32 mult_factor;
-	char name[SCMI_MAX_STR_SIZE];
+	struct scmi_perf_domain_info info;
 	struct scmi_opp opp[MAX_OPPS];
 	struct scmi_fc_info *fc_info;
 	struct xarray opps_by_idx;
@@ -257,7 +256,7 @@ scmi_perf_domain_attributes_get(const struct scmi_protocol_handle *ph,
 		flags = le32_to_cpu(attr->flags);
 
 		dom_info->set_limits = SUPPORTS_SET_LIMITS(flags);
-		dom_info->set_perf = SUPPORTS_SET_PERF_LVL(flags);
+		dom_info->info.set_perf = SUPPORTS_SET_PERF_LVL(flags);
 		dom_info->perf_limit_notify = SUPPORTS_PERF_LIMIT_NOTIFY(flags);
 		dom_info->perf_level_notify = SUPPORTS_PERF_LEVEL_NOTIFY(flags);
 		dom_info->perf_fastchannels = SUPPORTS_PERF_FASTCHANNELS(flags);
@@ -276,7 +275,8 @@ scmi_perf_domain_attributes_get(const struct scmi_protocol_handle *ph,
 			dom_info->mult_factor =
 					(dom_info->sustained_freq_khz * 1000) /
 					dom_info->sustained_perf_level;
-		strscpy(dom_info->name, attr->name, SCMI_SHORT_NAME_MAX_SIZE);
+		strscpy(dom_info->info.name, attr->name,
+			SCMI_SHORT_NAME_MAX_SIZE);
 	}
 
 	ph->xops->xfer_put(ph, t);
@@ -288,7 +288,7 @@ scmi_perf_domain_attributes_get(const struct scmi_protocol_handle *ph,
 	if (!ret && PROTOCOL_REV_MAJOR(version) >= 0x3 &&
 	    SUPPORTS_EXTENDED_NAMES(flags))
 		ph->hops->extended_name_get(ph, PERF_DOMAIN_NAME_GET,
-					    dom_info->id, dom_info->name,
+					    dom_info->id, dom_info->info.name,
 					    SCMI_MAX_STR_SIZE);
 
 	if (dom_info->level_indexing_mode) {
@@ -430,6 +430,29 @@ static int scmi_perf_num_domains_get(const struct scmi_protocol_handle *ph)
 	return pi->num_domains;
 }
 
+static inline struct perf_dom_info *
+scmi_perf_domain_lookup(const struct scmi_protocol_handle *ph, u32 domain)
+{
+	struct scmi_perf_info *pi = ph->get_priv(ph);
+
+	if (domain >= pi->num_domains)
+		return ERR_PTR(-EINVAL);
+
+	return pi->dom_info + domain;
+}
+
+static const struct scmi_perf_domain_info *
+scmi_perf_info_get(const struct scmi_protocol_handle *ph, u32 domain)
+{
+	struct perf_dom_info *dom;
+
+	dom = scmi_perf_domain_lookup(ph, domain);
+	if (IS_ERR(dom))
+		return ERR_PTR(-EINVAL);
+
+	return &dom->info;
+}
+
 static int scmi_perf_msg_limits_set(const struct scmi_protocol_handle *ph,
 				    u32 domain, u32 max_perf, u32 min_perf)
 {
@@ -453,17 +476,6 @@ static int scmi_perf_msg_limits_set(const struct scmi_protocol_handle *ph,
 	return ret;
 }
 
-static inline struct perf_dom_info *
-scmi_perf_domain_lookup(const struct scmi_protocol_handle *ph, u32 domain)
-{
-	struct scmi_perf_info *pi = ph->get_priv(ph);
-
-	if (domain >= pi->num_domains)
-		return ERR_PTR(-EINVAL);
-
-	return pi->dom_info + domain;
-}
-
 static int __scmi_perf_limits_set(const struct scmi_protocol_handle *ph,
 				  struct perf_dom_info *dom, u32 max_perf,
 				  u32 min_perf)
@@ -819,7 +831,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
 		}
 
 		dev_dbg(dev, "[%d][%s]:: Registered OPP[%d] %lu\n",
-			domain, dom->name, idx, freq);
+			domain, dom->info.name, idx, freq);
 	}
 	return 0;
 }
@@ -956,6 +968,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,
+	.info_get = scmi_perf_info_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 71b39cbbdace..71923ae63b01 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -97,11 +97,17 @@ struct scmi_clk_proto_ops {
 			      u32 clk_id);
 };
 
+struct scmi_perf_domain_info {
+	char name[SCMI_MAX_STR_SIZE];
+	bool set_perf;
+};
+
 /**
  * struct scmi_perf_proto_ops - represents the various operations provided
  *	by SCMI Performance Protocol
  *
  * @num_domains_get: gets the number of supported performance domains
+ * @info_get: get the information of a performance domain
  * @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
@@ -122,6 +128,8 @@ struct scmi_clk_proto_ops {
  */
 struct scmi_perf_proto_ops {
 	int (*num_domains_get)(const struct scmi_protocol_handle *ph);
+	const struct scmi_perf_domain_info __must_check *(*info_get)
+		(const struct scmi_protocol_handle *ph, u32 domain);
 	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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
  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-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
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

The OF parsing of the clock domain specifier seems to better belong in the
scmi cpufreq driver, rather than being implemented behind the generic
->device_domain_id() perf protocol ops.

To prepare to remove the ->device_domain_id() ops, let's implement the OF
parsing in the scmi cpufreq driver instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- Re-based.

---
 drivers/cpufreq/scmi-cpufreq.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index f34e6382a4c5..7d05d48c0337 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -70,13 +70,24 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy,
 	return 0;
 }
 
+static int scmi_cpu_domain_id(struct device *cpu_dev)
+{
+	struct of_phandle_args clkspec;
+
+	if (of_parse_phandle_with_args(cpu_dev->of_node, "clocks",
+				       "#clock-cells", 0, &clkspec))
+		return -EINVAL;
+
+	return clkspec.args[0];
+}
+
 static int
 scmi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
 {
 	int cpu, domain, tdomain;
 	struct device *tcpu_dev;
 
-	domain = perf_ops->device_domain_id(cpu_dev);
+	domain = scmi_cpu_domain_id(cpu_dev);
 	if (domain < 0)
 		return domain;
 
@@ -88,7 +99,7 @@ scmi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
 		if (!tcpu_dev)
 			continue;
 
-		tdomain = perf_ops->device_domain_id(tcpu_dev);
+		tdomain = scmi_cpu_domain_id(tcpu_dev);
 		if (tdomain == domain)
 			cpumask_set_cpu(cpu, cpumask);
 	}
@@ -104,7 +115,7 @@ scmi_get_cpu_power(struct device *cpu_dev, unsigned long *power,
 	unsigned long Hz;
 	int ret, domain;
 
-	domain = perf_ops->device_domain_id(cpu_dev);
+	domain = scmi_cpu_domain_id(cpu_dev);
 	if (domain < 0)
 		return domain;
 
@@ -209,7 +220,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	}
 
 	priv->cpu_dev = cpu_dev;
-	priv->domain_id = perf_ops->device_domain_id(cpu_dev);
+	priv->domain_id = scmi_cpu_domain_id(cpu_dev);
 
 	policy->driver_data = priv;
 	policy->freq_table = freq_table;
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 04/13] firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (2 preceding siblings ...)
  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: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
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

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>
---

Changes in v3:
	- Re-based.

---
 drivers/cpufreq/scmi-cpufreq.c   | 14 +++++++++-----
 drivers/firmware/arm_scmi/perf.c | 22 ++++------------------
 include/linux/scmi_protocol.h    |  6 +++---
 3 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 7d05d48c0337..125e8a8421fb 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -137,7 +137,7 @@ scmi_get_cpu_power(struct device *cpu_dev, unsigned long *power,
 
 static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 {
-	int ret, nr_opp;
+	int ret, nr_opp, domain;
 	unsigned int latency;
 	struct device *cpu_dev;
 	struct scmi_data *priv;
@@ -149,6 +149,10 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 		return -ENODEV;
 	}
 
+	domain = scmi_cpu_domain_id(cpu_dev);
+	if (domain < 0)
+		return domain;
+
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
@@ -187,7 +191,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	  */
 	nr_opp = dev_pm_opp_get_opp_count(cpu_dev);
 	if (nr_opp <= 0) {
-		ret = perf_ops->device_opps_add(ph, cpu_dev);
+		ret = perf_ops->device_opps_add(ph, cpu_dev, domain);
 		if (ret) {
 			dev_warn(cpu_dev, "failed to add opps to the device\n");
 			goto out_free_cpumask;
@@ -220,7 +224,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	}
 
 	priv->cpu_dev = cpu_dev;
-	priv->domain_id = scmi_cpu_domain_id(cpu_dev);
+	priv->domain_id = domain;
 
 	policy->driver_data = priv;
 	policy->freq_table = freq_table;
@@ -228,14 +232,14 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	/* SCMI allows DVFS request for any domain from any CPU */
 	policy->dvfs_possible_from_any_cpu = true;
 
-	latency = perf_ops->transition_latency_get(ph, cpu_dev);
+	latency = perf_ops->transition_latency_get(ph, domain);
 	if (!latency)
 		latency = CPUFREQ_ETERNAL;
 
 	policy->cpuinfo.transition_latency = latency;
 
 	policy->fast_switch_possible =
-		perf_ops->fast_switch_possible(ph, cpu_dev);
+		perf_ops->fast_switch_possible(ph, domain);
 
 	return 0;
 
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index d20bb6b8abfa..092b51cf9596 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -795,17 +795,13 @@ static int scmi_dev_domain_id(struct device *dev)
 }
 
 static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
-				     struct device *dev)
+				     struct device *dev, u32 domain)
 {
-	int idx, ret, domain;
+	int idx, ret;
 	unsigned long freq;
 	struct scmi_opp *opp;
 	struct perf_dom_info *dom;
 
-	domain = scmi_dev_domain_id(dev);
-	if (domain < 0)
-		return -EINVAL;
-
 	dom = scmi_perf_domain_lookup(ph, domain);
 	if (IS_ERR(dom))
 		return PTR_ERR(dom);
@@ -838,15 +834,10 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
 
 static int
 scmi_dvfs_transition_latency_get(const struct scmi_protocol_handle *ph,
-				 struct device *dev)
+				 u32 domain)
 {
-	int domain;
 	struct perf_dom_info *dom;
 
-	domain = scmi_dev_domain_id(dev);
-	if (domain < 0)
-		return -EINVAL;
-
 	dom = scmi_perf_domain_lookup(ph, domain);
 	if (IS_ERR(dom))
 		return PTR_ERR(dom);
@@ -942,15 +933,10 @@ static int scmi_dvfs_est_power_get(const struct scmi_protocol_handle *ph,
 }
 
 static bool scmi_fast_switch_possible(const struct scmi_protocol_handle *ph,
-				      struct device *dev)
+				      u32 domain)
 {
-	int domain;
 	struct perf_dom_info *dom;
 
-	domain = scmi_dev_domain_id(dev);
-	if (domain < 0)
-		return false;
-
 	dom = scmi_perf_domain_lookup(ph, domain);
 	if (IS_ERR(dom))
 		return false;
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 71923ae63b01..bf6b0be1890e 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -140,9 +140,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,
@@ -150,7 +150,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);
 };
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 05/13] firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (3 preceding siblings ...)
  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-08-25 11:26 ` [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus() Ulf Hansson
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

There are no longer any users of the ->device_domain_id() ops in the
scmi_perf_proto_ops, therefore let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- None.

---
 drivers/firmware/arm_scmi/perf.c | 13 -------------
 include/linux/scmi_protocol.h    |  2 --
 2 files changed, 15 deletions(-)

diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 092b51cf9596..9eb58df9124d 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -782,18 +782,6 @@ static void scmi_perf_domain_init_fc(const struct scmi_protocol_handle *ph,
 	*p_fc = fc;
 }
 
-/* Device specific ops */
-static int scmi_dev_domain_id(struct device *dev)
-{
-	struct of_phandle_args clkspec;
-
-	if (of_parse_phandle_with_args(dev->of_node, "clocks", "#clock-cells",
-				       0, &clkspec))
-		return -EINVAL;
-
-	return clkspec.args[0];
-}
-
 static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph,
 				     struct device *dev, u32 domain)
 {
@@ -959,7 +947,6 @@ static const struct scmi_perf_proto_ops perf_proto_ops = {
 	.limits_get = scmi_perf_limits_get,
 	.level_set = scmi_perf_level_set,
 	.level_get = scmi_perf_level_get,
-	.device_domain_id = scmi_dev_domain_id,
 	.transition_latency_get = scmi_dvfs_transition_latency_get,
 	.device_opps_add = scmi_dvfs_device_opps_add,
 	.freq_set = scmi_dvfs_freq_set,
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index bf6b0be1890e..26cda536716a 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -112,7 +112,6 @@ struct scmi_perf_domain_info {
  * @limits_get: gets limits on the performance level of a domain
  * @level_set: sets the performance level of a domain
  * @level_get: gets the performance level of a domain
- * @device_domain_id: gets the scmi domain id for a given device
  * @transition_latency_get: gets the DVFS transition latency for a given device
  * @device_opps_add: adds all the OPPs for a given device
  * @freq_set: sets the frequency for a given device using sustained frequency
@@ -138,7 +137,6 @@ struct scmi_perf_proto_ops {
 			 u32 level, bool poll);
 	int (*level_get)(const struct scmi_protocol_handle *ph, u32 domain,
 			 u32 *level, bool poll);
-	int (*device_domain_id)(struct device *dev);
 	int (*transition_latency_get)(const struct scmi_protocol_handle *ph,
 				      u32 domain);
 	int (*device_opps_add)(const struct scmi_protocol_handle *ph,
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (4 preceding siblings ...)
  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-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
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

The domain-id for the cpu_dev has already been parsed at the point when
scmi_get_sharing_cpus() is getting called. Let's pass it as an in-parameter
to avoid the unnecessary OF parsing.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- None.

---
 drivers/cpufreq/scmi-cpufreq.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 125e8a8421fb..78f53e388094 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -82,15 +82,12 @@ static int scmi_cpu_domain_id(struct device *cpu_dev)
 }
 
 static int
-scmi_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
+scmi_get_sharing_cpus(struct device *cpu_dev, int domain,
+		      struct cpumask *cpumask)
 {
-	int cpu, domain, tdomain;
+	int cpu, tdomain;
 	struct device *tcpu_dev;
 
-	domain = scmi_cpu_domain_id(cpu_dev);
-	if (domain < 0)
-		return domain;
-
 	for_each_possible_cpu(cpu) {
 		if (cpu == cpu_dev->id)
 			continue;
@@ -163,7 +160,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	}
 
 	/* Obtain CPUs that share SCMI performance controls */
-	ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus);
+	ret = scmi_get_sharing_cpus(cpu_dev, domain, policy->cpus);
 	if (ret) {
 		dev_warn(cpu_dev, "failed to get sharing cpumask\n");
 		goto out_free_cpumask;
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (5 preceding siblings ...)
  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 11:14   ` 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
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
up the code a bit.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- None.

---
 drivers/cpufreq/scmi-cpufreq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 78f53e388094..48bd393a1506 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -320,11 +320,9 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
 	if (IS_ERR(perf_ops))
 		return PTR_ERR(perf_ops);
 
-#ifdef CONFIG_COMMON_CLK
 	/* dummy clock provider as needed by OPP if clocks property is used */
 	if (of_property_present(dev->of_node, "#clock-cells"))
 		devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
-#endif
 
 	ret = cpufreq_register_driver(&scmi_cpufreq_driver);
 	if (ret) {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (6 preceding siblings ...)
  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-11 13:20   ` Rob Herring
  2023-09-21 11:11   ` Sudeep Holla
  2023-08-25 11:26 ` [PATCH v3 09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13 Ulf Hansson
                   ` (6 subsequent siblings)
  14 siblings, 2 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, Lorenzo Pieralisi

When an CPU's performance domain is managed through the SCMI firmware,
let's enable us describe this as a consumer of a power-domain provider,
which is the de-facto standard to use for performance domains. In this
case, let's specify a corresponding power-domain-name, to point out the
corresponding index for it.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- New patch.

---
 Documentation/devicetree/bindings/arm/cpus.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index 9e6a45eea4e5..d51e6250d6e3 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -305,7 +305,9 @@ properties:
       power-domains property.
 
       For PSCI based platforms, the name corresponding to the index of the PSCI
-      PM domain provider, must be "psci".
+      PM domain provider, must be "psci". For SCMI based platforms, the name
+      corresponding to the index of an SCMI performance domain provider, must be
+      "perf".
 
   qcom,saw:
     $ref: /schemas/types.yaml#/definitions/phandle
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (7 preceding siblings ...)
  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-08-25 11:26 ` [PATCH v3 10/13] dt-bindings: power: Clarify performance capabilities of power-domains Ulf Hansson
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree

The protocol@13 node is describing the performance scaling option for the
ARM SCMI interface, as a clock provider. This is unnecessary limiting, as
performance scaling is in many cases not limited to switching a clock's
frequency.

Therefore, let's extend the binding so the interface can be modelled as a
generic performance domain too. The common way to describe this, is to use
the power-domain DT bindings, so let's use that.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- None.

---
 .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index b138f3d23df8..563a87dfb31a 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -149,8 +149,15 @@ properties:
       '#clock-cells':
         const: 1
 
-    required:
-      - '#clock-cells'
+      '#power-domain-cells':
+        const: 1
+
+    oneOf:
+      - required:
+          - '#clock-cells'
+
+      - required:
+          - '#power-domain-cells'
 
   protocol@14:
     $ref: '#/$defs/protocol-node'
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 10/13] dt-bindings: power: Clarify performance capabilities of power-domains
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (8 preceding siblings ...)
  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 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
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel, Rafael J . Wysocki,
	Kevin Hilman, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree

The power-domains bindings has in many years been used to describe so
called performance-domains too. Rather than using a separate binding it has
been convenient to re-use the power-domain bindings, as in some cases it's
in fact a combination of the both that would be the best description.

Therefore, let's make it more clear that the power-domains bindings can be
used to describe a performance-domain too.

Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- New patch.

---
 .../devicetree/bindings/power/power-domain.yaml | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/power/power-domain.yaml b/Documentation/devicetree/bindings/power/power-domain.yaml
index d1235e562041..8fdb529d560b 100644
--- a/Documentation/devicetree/bindings/power/power-domain.yaml
+++ b/Documentation/devicetree/bindings/power/power-domain.yaml
@@ -13,8 +13,9 @@ maintainers:
 
 description: |+
   System on chip designs are often divided into multiple PM domains that can be
-  used for power gating of selected IP blocks for power saving by reduced leakage
-  current.
+  used for power gating of selected IP blocks for power saving by reduced
+  leakage current. Moreover, in some cases the similar PM domains may also be
+  capable of scaling performance for a group of IP blocks.
 
   This device tree binding can be used to bind PM domain consumer devices with
   their PM domains provided by PM domain providers. A PM domain provider can be
@@ -25,7 +26,7 @@ description: |+
 
 properties:
   $nodename:
-    pattern: "^(power-controller|power-domain)([@-].*)?$"
+    pattern: "^(power-controller|power-domain|performance-domain)([@-].*)?$"
 
   domain-idle-states:
     $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -44,11 +45,11 @@ properties:
 
   operating-points-v2:
     description:
-      Phandles to the OPP tables of power domains provided by a power domain
-      provider. If the provider provides a single power domain only or all
-      the power domains provided by the provider have identical OPP tables,
-      then this shall contain a single phandle. Refer to ../opp/opp-v2-base.yaml
-      for more information.
+      Phandles to the OPP tables of power domains that are capable of scaling
+      performance, provided by a power domain provider. If the provider provides
+      a single power domain only or all the power domains provided by the
+      provider have identical OPP tables, then this shall contain a single
+      phandle. Refer to ../opp/opp-v2-base.yaml for more information.
 
   "#power-domain-cells":
     description:
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (9 preceding siblings ...)
  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-21 11:17   ` Sudeep Holla
  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
                   ` (3 subsequent siblings)
  14 siblings, 2 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

The performance domain-id can be described in DT using the power-domains
property or the clock property. The latter is already supported, so let's
add support for the power-domains too.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- Move to get the power-domain index from power-domain-names.

---
 drivers/cpufreq/scmi-cpufreq.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 48bd393a1506..08497b84efe1 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -72,13 +72,26 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy,
 
 static int scmi_cpu_domain_id(struct device *cpu_dev)
 {
-	struct of_phandle_args clkspec;
-
-	if (of_parse_phandle_with_args(cpu_dev->of_node, "clocks",
-				       "#clock-cells", 0, &clkspec))
-		return -EINVAL;
+	struct device_node *np = cpu_dev->of_node;
+	struct of_phandle_args domain_id;
+	int index;
+
+	if (of_parse_phandle_with_args(np, "clocks", "#clock-cells", 0,
+				       &domain_id)) {
+
+		/* Find the corresponding index for power-domain "perf". */
+		index = of_property_match_string(np, "power-domain-names",
+						 "perf");
+		if (index < 0)
+			return -EINVAL;
+
+		if (of_parse_phandle_with_args(np, "power-domains",
+					       "#power-domain-cells", index,
+					       &domain_id))
+			return -EINVAL;
+	}
 
-	return clkspec.args[0];
+	return domain_id.args[0];
 }
 
 static int
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (10 preceding siblings ...)
  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:20   ` Sudeep Holla
  2023-08-25 11:26 ` [PATCH v3 13/13] genpd: arm: Add the SCMI performance domain Ulf Hansson
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

In some cases the OPP tables aren't specified in device tree, but rather
encoded in the FW. To allow a genpd provider to specify them dynamically
instead, let's add a new genpd flag, GENPD_FLAG_OPP_TABLE_FW.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- None.

---
 drivers/base/power/domain.c | 11 ++++++-----
 include/linux/pm_domain.h   |  5 +++++
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 5cb2023581d4..c74edf80417f 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -130,6 +130,7 @@ static const struct genpd_lock_ops genpd_spin_ops = {
 #define genpd_is_active_wakeup(genpd)	(genpd->flags & GENPD_FLAG_ACTIVE_WAKEUP)
 #define genpd_is_cpu_domain(genpd)	(genpd->flags & GENPD_FLAG_CPU_DOMAIN)
 #define genpd_is_rpm_always_on(genpd)	(genpd->flags & GENPD_FLAG_RPM_ALWAYS_ON)
+#define genpd_is_opp_table_fw(genpd)	(genpd->flags & GENPD_FLAG_OPP_TABLE_FW)
 
 static inline bool irq_safe_dev_in_sleep_domain(struct device *dev,
 		const struct generic_pm_domain *genpd)
@@ -2328,7 +2329,7 @@ int of_genpd_add_provider_simple(struct device_node *np,
 	genpd->dev.of_node = np;
 
 	/* Parse genpd OPP table */
-	if (genpd->set_performance_state) {
+	if (!genpd_is_opp_table_fw(genpd) && genpd->set_performance_state) {
 		ret = dev_pm_opp_of_add_table(&genpd->dev);
 		if (ret)
 			return dev_err_probe(&genpd->dev, ret, "Failed to add OPP table\n");
@@ -2343,7 +2344,7 @@ int of_genpd_add_provider_simple(struct device_node *np,
 
 	ret = genpd_add_provider(np, genpd_xlate_simple, genpd);
 	if (ret) {
-		if (genpd->set_performance_state) {
+		if (!genpd_is_opp_table_fw(genpd) && genpd->set_performance_state) {
 			dev_pm_opp_put_opp_table(genpd->opp_table);
 			dev_pm_opp_of_remove_table(&genpd->dev);
 		}
@@ -2387,7 +2388,7 @@ int of_genpd_add_provider_onecell(struct device_node *np,
 		genpd->dev.of_node = np;
 
 		/* Parse genpd OPP table */
-		if (genpd->set_performance_state) {
+		if (!genpd_is_opp_table_fw(genpd) && genpd->set_performance_state) {
 			ret = dev_pm_opp_of_add_table_indexed(&genpd->dev, i);
 			if (ret) {
 				dev_err_probe(&genpd->dev, ret,
@@ -2423,7 +2424,7 @@ int of_genpd_add_provider_onecell(struct device_node *np,
 		genpd->provider = NULL;
 		genpd->has_provider = false;
 
-		if (genpd->set_performance_state) {
+		if (!genpd_is_opp_table_fw(genpd) && genpd->set_performance_state) {
 			dev_pm_opp_put_opp_table(genpd->opp_table);
 			dev_pm_opp_of_remove_table(&genpd->dev);
 		}
@@ -2455,7 +2456,7 @@ void of_genpd_del_provider(struct device_node *np)
 				if (gpd->provider == &np->fwnode) {
 					gpd->has_provider = false;
 
-					if (!gpd->set_performance_state)
+					if (genpd_is_opp_table_fw(gpd) || !gpd->set_performance_state)
 						continue;
 
 					dev_pm_opp_put_opp_table(gpd->opp_table);
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index f776fb93eaa0..05ad8cefdff1 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -61,6 +61,10 @@
  * GENPD_FLAG_MIN_RESIDENCY:	Enable the genpd governor to consider its
  *				components' next wakeup when determining the
  *				optimal idle state.
+ *
+ * GENPD_FLAG_OPP_TABLE_FW:	The genpd provider supports performance states,
+ *				but its corresponding OPP tables are not
+ *				described in DT, but are given directly by FW.
  */
 #define GENPD_FLAG_PM_CLK	 (1U << 0)
 #define GENPD_FLAG_IRQ_SAFE	 (1U << 1)
@@ -69,6 +73,7 @@
 #define GENPD_FLAG_CPU_DOMAIN	 (1U << 4)
 #define GENPD_FLAG_RPM_ALWAYS_ON (1U << 5)
 #define GENPD_FLAG_MIN_RESIDENCY (1U << 6)
+#define GENPD_FLAG_OPP_TABLE_FW	 (1U << 7)
 
 enum gpd_status {
 	GENPD_STATE_ON = 0,	/* PM domain is on */
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 13/13] genpd: arm: Add the SCMI performance domain
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (11 preceding siblings ...)
  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-14 22:45 ` [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
  2023-09-25  9:39 ` Sudeep Holla
  14 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-08-25 11:26 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, Ulf Hansson,
	linux-pm, linux-arm-kernel, linux-kernel

To enable support for performance scaling (DVFS) for generic devices with
the SCMI performance protocol, let's add an SCMI performance domain. This
is being modelled as a genpd provider, with support for performance scaling
through genpd's ->set_performance_state() callback.

Note that, this adds the initial support that allows consumer drivers for
attached devices, to vote for a new performance state via calling the
dev_pm_genpd_set_performance_state(). However, this should be avoided as
it's in most cases preferred to use the OPP library to vote for a new OPP
instead. The support using the OPP library isn't part of this change, but
needs to be implemented from subsequent changes.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---

Changes in v3:
	- Move files to drivers/genpd/arm/ and update MAINTAINERS.
	- Updated the commit msg header.
	- Prevent setting performance level 0.
	- Initialize the genpd as always-on.
	- Note, the corresponding Kconfigs should be placed in the genpd dir
	too, but that's better suited on top or through a later-version.

---
 MAINTAINERS                          |   1 +
 drivers/firmware/arm_scmi/Kconfig    |  12 +++
 drivers/genpd/Makefile               |   1 +
 drivers/genpd/arm/Makefile           |   3 +
 drivers/genpd/arm/scmi_perf_domain.c | 150 +++++++++++++++++++++++++++
 5 files changed, 167 insertions(+)
 create mode 100644 drivers/genpd/arm/Makefile
 create mode 100644 drivers/genpd/arm/scmi_perf_domain.c

diff --git a/MAINTAINERS b/MAINTAINERS
index dff5d812f3ff..8995a160b240 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20705,6 +20705,7 @@ F:	drivers/clk/clk-sc[mp]i.c
 F:	drivers/cpufreq/sc[mp]i-cpufreq.c
 F:	drivers/firmware/arm_scmi/
 F:	drivers/firmware/arm_scpi.c
+F:	drivers/genpd/arm/
 F:	drivers/powercap/arm_scmi_powercap.c
 F:	drivers/regulator/scmi-regulator.c
 F:	drivers/reset/reset-scmi.c
diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index ea0f5083ac47..706d1264d038 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -181,6 +181,18 @@ config ARM_SCMI_POWER_DOMAIN
 	  will be called scmi_pm_domain. Note this may needed early in boot
 	  before rootfs may be available.
 
+config ARM_SCMI_PERF_DOMAIN
+	tristate "SCMI performance domain driver"
+	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
+	default y
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  This enables support for the SCMI performance domains which can be
+	  enabled or disabled via the SCP firmware.
+
+	  This driver can also be built as a module. If so, the module will be
+	  called scmi_perf_domain.
+
 config ARM_SCMI_POWER_CONTROL
 	tristate "SCMI system power control driver"
 	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
diff --git a/drivers/genpd/Makefile b/drivers/genpd/Makefile
index 666753676e5c..f0326b27b30b 100644
--- a/drivers/genpd/Makefile
+++ b/drivers/genpd/Makefile
@@ -2,6 +2,7 @@
 obj-y					+= actions/
 obj-y					+= amlogic/
 obj-y					+= apple/
+obj-y					+= arm/
 obj-y					+= bcm/
 obj-y					+= imx/
 obj-y					+= mediatek/
diff --git a/drivers/genpd/arm/Makefile b/drivers/genpd/arm/Makefile
new file mode 100644
index 000000000000..7128db96deac
--- /dev/null
+++ b/drivers/genpd/arm/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_ARM_SCMI_PERF_DOMAIN) += scmi_perf_domain.o
diff --git a/drivers/genpd/arm/scmi_perf_domain.c b/drivers/genpd/arm/scmi_perf_domain.c
new file mode 100644
index 000000000000..aa100270500f
--- /dev/null
+++ b/drivers/genpd/arm/scmi_perf_domain.c
@@ -0,0 +1,150 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * SCMI performance domain support.
+ *
+ * Copyright (C) 2023 Linaro Ltd.
+ */
+
+#include <linux/err.h>
+#include <linux/device.h>
+#include <linux/module.h>
+#include <linux/pm_domain.h>
+#include <linux/scmi_protocol.h>
+#include <linux/slab.h>
+
+struct scmi_perf_domain {
+	struct generic_pm_domain genpd;
+	const struct scmi_perf_proto_ops *perf_ops;
+	const struct scmi_protocol_handle *ph;
+	const struct scmi_perf_domain_info *info;
+	u32 domain_id;
+};
+
+#define to_scmi_pd(pd) container_of(pd, struct scmi_perf_domain, genpd)
+
+static int
+scmi_pd_set_perf_state(struct generic_pm_domain *genpd, unsigned int state)
+{
+	struct scmi_perf_domain *pd = to_scmi_pd(genpd);
+	int ret;
+
+	if (!pd->info->set_perf)
+		return 0;
+
+	if (!state)
+		return -EINVAL;
+
+	ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, true);
+	if (ret)
+		dev_warn(&genpd->dev, "Failed with %d when trying to set %d perf level",
+			 ret, state);
+
+	return ret;
+}
+
+static int scmi_perf_domain_probe(struct scmi_device *sdev)
+{
+	struct device *dev = &sdev->dev;
+	const struct scmi_handle *handle = sdev->handle;
+	const struct scmi_perf_proto_ops *perf_ops;
+	struct scmi_protocol_handle *ph;
+	struct scmi_perf_domain *scmi_pd;
+	struct genpd_onecell_data *scmi_pd_data;
+	struct generic_pm_domain **domains;
+	int num_domains, i, ret = 0;
+
+	if (!handle)
+		return -ENODEV;
+
+	/* The OF node must specify us as a power-domain provider. */
+	if (!of_find_property(dev->of_node, "#power-domain-cells", NULL))
+		return 0;
+
+	perf_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_PERF, &ph);
+	if (IS_ERR(perf_ops))
+		return PTR_ERR(perf_ops);
+
+	num_domains = perf_ops->num_domains_get(ph);
+	if (num_domains < 0) {
+		dev_warn(dev, "Failed with %d when getting num perf domains\n",
+			 num_domains);
+		return num_domains;
+	} else if (!num_domains) {
+		return 0;
+	}
+
+	scmi_pd = devm_kcalloc(dev, num_domains, sizeof(*scmi_pd), GFP_KERNEL);
+	if (!scmi_pd)
+		return -ENOMEM;
+
+	scmi_pd_data = devm_kzalloc(dev, sizeof(*scmi_pd_data), GFP_KERNEL);
+	if (!scmi_pd_data)
+		return -ENOMEM;
+
+	domains = devm_kcalloc(dev, num_domains, sizeof(*domains), GFP_KERNEL);
+	if (!domains)
+		return -ENOMEM;
+
+	for (i = 0; i < num_domains; i++, scmi_pd++) {
+		scmi_pd->info = perf_ops->info_get(ph, i);
+
+		scmi_pd->domain_id = i;
+		scmi_pd->perf_ops = perf_ops;
+		scmi_pd->ph = ph;
+		scmi_pd->genpd.name = scmi_pd->info->name;
+		scmi_pd->genpd.flags = GENPD_FLAG_ALWAYS_ON |
+				       GENPD_FLAG_OPP_TABLE_FW;
+		scmi_pd->genpd.set_performance_state = scmi_pd_set_perf_state;
+
+		ret = pm_genpd_init(&scmi_pd->genpd, NULL, false);
+		if (ret)
+			goto err;
+
+		domains[i] = &scmi_pd->genpd;
+	}
+
+	scmi_pd_data->domains = domains;
+	scmi_pd_data->num_domains = num_domains;
+
+	ret = of_genpd_add_provider_onecell(dev->of_node, scmi_pd_data);
+	if (ret)
+		goto err;
+
+	dev_set_drvdata(dev, scmi_pd_data);
+	dev_info(dev, "Initialized %d performance domains", num_domains);
+	return 0;
+err:
+	for (i--; i >= 0; i--)
+		pm_genpd_remove(domains[i]);
+	return ret;
+}
+
+static void scmi_perf_domain_remove(struct scmi_device *sdev)
+{
+	struct device *dev = &sdev->dev;
+	struct genpd_onecell_data *scmi_pd_data = dev_get_drvdata(dev);
+	int i;
+
+	of_genpd_del_provider(dev->of_node);
+
+	for (i = 0; i < scmi_pd_data->num_domains; i++)
+		pm_genpd_remove(scmi_pd_data->domains[i]);
+}
+
+static const struct scmi_device_id scmi_id_table[] = {
+	{ SCMI_PROTOCOL_PERF, "perf" },
+	{ },
+};
+MODULE_DEVICE_TABLE(scmi, scmi_id_table);
+
+static struct scmi_driver scmi_perf_domain_driver = {
+	.name		= "scmi-perf-domain",
+	.probe		= scmi_perf_domain_probe,
+	.remove		= scmi_perf_domain_remove,
+	.id_table	= scmi_id_table,
+};
+module_scmi_driver(scmi_perf_domain_driver);
+
+MODULE_AUTHOR("Ulf Hansson <ulf.hansson@linaro.org>");
+MODULE_DESCRIPTION("ARM SCMI perf domain driver");
+MODULE_LICENSE("GPL v2");
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
  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-09-11 13:20   ` Rob Herring
  2023-09-21 11:11   ` Sudeep Holla
  1 sibling, 0 replies; 35+ messages in thread
From: Rob Herring @ 2023-09-11 13:20 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Viresh Kumar, Cristian Marussi, Lorenzo Pieralisi,
	devicetree, Alexandre Torgue, Stephen Boyd, Conor Dooley,
	Prasad Sodagudi, linux-kernel, Rob Herring, Nikunj Kela,
	Nishanth Menon, Krzysztof Kozlowski, linux-pm, linux-arm-kernel


On Fri, 25 Aug 2023 13:26:28 +0200, Ulf Hansson wrote:
> When an CPU's performance domain is managed through the SCMI firmware,
> let's enable us describe this as a consumer of a power-domain provider,
> which is the de-facto standard to use for performance domains. In this
> case, let's specify a corresponding power-domain-name, to point out the
> corresponding index for it.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 
> Changes in v3:
> 	- New patch.
> 
> ---
>  Documentation/devicetree/bindings/arm/cpus.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
  2023-08-25 11:26 ` [PATCH v3 09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13 Ulf Hansson
@ 2023-09-11 13:20   ` Rob Herring
  0 siblings, 0 replies; 35+ messages in thread
From: Rob Herring @ 2023-09-11 13:20 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Stephen Boyd, Prasad Sodagudi, Nikunj Kela, linux-pm,
	linux-arm-kernel, devicetree, Alexandre Torgue,
	Krzysztof Kozlowski, Viresh Kumar, Cristian Marussi, Conor Dooley,
	Rob Herring, Sudeep Holla, linux-kernel, Nishanth Menon


On Fri, 25 Aug 2023 13:26:29 +0200, Ulf Hansson wrote:
> The protocol@13 node is describing the performance scaling option for the
> ARM SCMI interface, as a clock provider. This is unnecessary limiting, as
> performance scaling is in many cases not limited to switching a clock's
> frequency.
> 
> Therefore, let's extend the binding so the interface can be modelled as a
> generic performance domain too. The common way to describe this, is to use
> the power-domain DT bindings, so let's use that.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 
> Changes in v3:
> 	- None.
> 
> ---
>  .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 10/13] dt-bindings: power: Clarify performance capabilities of power-domains
  2023-08-25 11:26 ` [PATCH v3 10/13] dt-bindings: power: Clarify performance capabilities of power-domains Ulf Hansson
@ 2023-09-11 14:40   ` Rob Herring
  0 siblings, 0 replies; 35+ messages in thread
From: Rob Herring @ 2023-09-11 14:40 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Kevin Hilman, devicetree, Nishanth Menon,
	Rob Herring, Stephen Boyd, Viresh Kumar, linux-pm, Conor Dooley,
	Alexandre Torgue, linux-kernel, linux-arm-kernel,
	Cristian Marussi, Nikunj Kela, Prasad Sodagudi,
	Rafael J . Wysocki, Krzysztof Kozlowski


On Fri, 25 Aug 2023 13:26:30 +0200, Ulf Hansson wrote:
> The power-domains bindings has in many years been used to describe so
> called performance-domains too. Rather than using a separate binding it has
> been convenient to re-use the power-domain bindings, as in some cases it's
> in fact a combination of the both that would be the best description.
> 
> Therefore, let's make it more clear that the power-domains bindings can be
> used to describe a performance-domain too.
> 
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Kevin Hilman <khilman@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 
> Changes in v3:
> 	- New patch.
> 
> ---
>  .../devicetree/bindings/power/power-domain.yaml | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (12 preceding siblings ...)
  2023-08-25 11:26 ` [PATCH v3 13/13] genpd: arm: Add the SCMI performance domain Ulf Hansson
@ 2023-09-14 22:45 ` Ulf Hansson
  2023-09-18 10:26   ` Sudeep Holla
  2023-09-25  9:39 ` Sudeep Holla
  14 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-09-14 22:45 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi
  Cc: Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel, Viresh Kumar, Nishanth Menon,
	Stephen Boyd

Sudeep, Christian,

On Fri, 25 Aug 2023 at 13:26, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> Changes in v3:
>         - Re-based upon the for-next/scmi/updates branch.
>         - Re-ordered some of the patches in the series, to eas review.
>         - Added some new DT doc patches in the series, according to comments.
>         - Fixed other comments, see version history for each patch.
>
> Changes in v2:
>         - Split up the series, to get the basic support in place as the first
>         step. The part that remains is the integration with the OPP library, to
>         allow consumer drivers to change performance level using the OPP lib.
>         - Re-based on top v6.5-rc1.
>         - Other changes will be described for each patch.
>
> The current SCMI performance scaling support is limited to cpufreq. This series
> extends the support, so it can be used for all kind of devices and not only for
> CPUs.
>
> The changes are spread over a couple of different subsystems, although the
> changes that affects the other subsystems than the arm_scmi directory are
> mostly smaller, except for last patch which is in the new genpd directory.
>
> The series is based upon the for-next/scmi/updates branch, but to enable the
> genpd provider in patch 13 (the actual scmi performance domain driver) to be
> placed in the new genpd directory, I have also merged an immutable branch [1],
> which is queued for v6.6.
>
> Note that, I am runing this on the Qemu virt platform with Optee running an SCMI
> server. If you want some more details about my test setup, I can share this with
> you, just let me know.
>
> Looking forward to your feedback!
>
> Kind regards
> Ulf Hansson
>
> [1]
> git.kernel.org/pub/scm/linux/kernel/git/people/ulf.hansson/linux-pm.git genpd_create_dir
>
>
> Ulf Hansson (13):
>   firmware: arm_scmi: Extend perf protocol ops to get number of domains
>   firmware: arm_scmi: Extend perf protocol ops to get information of a
>     domain
>   cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
>   firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
>   firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
>   cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
>   cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
>   dt-bindings: arm: cpus: Add a power-domain-name for a
>     performance-domain
>   dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
>   dt-bindings: power: Clarify performance capabilities of power-domains
>   cpufreq: scmi: Add support to parse domain-id using
>     #power-domain-cells
>   PM: domains: Allow genpd providers to manage OPP tables directly by
>     its FW
>   genpd: arm: Add the SCMI performance domain
>
>  .../devicetree/bindings/arm/cpus.yaml         |   4 +-
>  .../bindings/firmware/arm,scmi.yaml           |  11 +-
>  .../bindings/power/power-domain.yaml          |  17 +-
>  MAINTAINERS                                   |   1 +
>  drivers/base/power/domain.c                   |  11 +-
>  drivers/cpufreq/scmi-cpufreq.c                |  55 +++++--
>  drivers/firmware/arm_scmi/Kconfig             |  12 ++
>  drivers/firmware/arm_scmi/perf.c              |  90 +++++------
>  drivers/genpd/Makefile                        |   1 +
>  drivers/genpd/arm/Makefile                    |   3 +
>  drivers/genpd/arm/scmi_perf_domain.c          | 150 ++++++++++++++++++
>  include/linux/pm_domain.h                     |   5 +
>  include/linux/scmi_protocol.h                 |  18 ++-
>  13 files changed, 293 insertions(+), 85 deletions(-)
>  create mode 100644 drivers/genpd/arm/Makefile
>  create mode 100644 drivers/genpd/arm/scmi_perf_domain.c
>

Unless you have some additional comments, I think patch 1 -> 12 should
be ready to be applied to your scmi tree, as is. I tried to apply it
today and did not encounter any problem.

Patch 13 needs a rebase so I will submit a new version of it. For you
to apply it to your tree, you need to move your scmi branch to
v6.6-rc2 (on Monday), would that be okay for you to manage?

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support
  2023-09-14 22:45 ` [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
@ 2023-09-18 10:26   ` Sudeep Holla
  2023-09-19 10:24     ` Ulf Hansson
  0 siblings, 1 reply; 35+ messages in thread
From: Sudeep Holla @ 2023-09-18 10:26 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Nikunj Kela, Sudeep Holla, Prasad Sodagudi,
	Alexandre Torgue, linux-pm, linux-arm-kernel, linux-kernel,
	Viresh Kumar, Nishanth Menon, Stephen Boyd

On Fri, Sep 15, 2023 at 12:45:02AM +0200, Ulf Hansson wrote:
> Sudeep, Christian,
> 
> On Fri, 25 Aug 2023 at 13:26, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > Changes in v3:
> >         - Re-based upon the for-next/scmi/updates branch.
> >         - Re-ordered some of the patches in the series, to eas review.
> >         - Added some new DT doc patches in the series, according to comments.
> >         - Fixed other comments, see version history for each patch.
> >
> > Changes in v2:
> >         - Split up the series, to get the basic support in place as the first
> >         step. The part that remains is the integration with the OPP library, to
> >         allow consumer drivers to change performance level using the OPP lib.
> >         - Re-based on top v6.5-rc1.
> >         - Other changes will be described for each patch.
> >
> > The current SCMI performance scaling support is limited to cpufreq. This series
> > extends the support, so it can be used for all kind of devices and not only for
> > CPUs.
> >
> > The changes are spread over a couple of different subsystems, although the
> > changes that affects the other subsystems than the arm_scmi directory are
> > mostly smaller, except for last patch which is in the new genpd directory.
> >
> > The series is based upon the for-next/scmi/updates branch, but to enable the
> > genpd provider in patch 13 (the actual scmi performance domain driver) to be
> > placed in the new genpd directory, I have also merged an immutable branch [1],
> > which is queued for v6.6.
> >
> > Note that, I am runing this on the Qemu virt platform with Optee running an SCMI
> > server. If you want some more details about my test setup, I can share this with
> > you, just let me know.
> >
> > Looking forward to your feedback!
> >
> > Kind regards
> > Ulf Hansson
> >
> > [1]
> > git.kernel.org/pub/scm/linux/kernel/git/people/ulf.hansson/linux-pm.git genpd_create_dir
> >
> >
> > Ulf Hansson (13):
> >   firmware: arm_scmi: Extend perf protocol ops to get number of domains
> >   firmware: arm_scmi: Extend perf protocol ops to get information of a
> >     domain
> >   cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
> >   firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
> >   firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
> >   cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
> >   cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
> >   dt-bindings: arm: cpus: Add a power-domain-name for a
> >     performance-domain
> >   dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
> >   dt-bindings: power: Clarify performance capabilities of power-domains
> >   cpufreq: scmi: Add support to parse domain-id using
> >     #power-domain-cells
> >   PM: domains: Allow genpd providers to manage OPP tables directly by
> >     its FW
> >   genpd: arm: Add the SCMI performance domain
> >
> >  .../devicetree/bindings/arm/cpus.yaml         |   4 +-
> >  .../bindings/firmware/arm,scmi.yaml           |  11 +-
> >  .../bindings/power/power-domain.yaml          |  17 +-
> >  MAINTAINERS                                   |   1 +
> >  drivers/base/power/domain.c                   |  11 +-
> >  drivers/cpufreq/scmi-cpufreq.c                |  55 +++++--
> >  drivers/firmware/arm_scmi/Kconfig             |  12 ++
> >  drivers/firmware/arm_scmi/perf.c              |  90 +++++------
> >  drivers/genpd/Makefile                        |   1 +
> >  drivers/genpd/arm/Makefile                    |   3 +
> >  drivers/genpd/arm/scmi_perf_domain.c          | 150 ++++++++++++++++++
> >  include/linux/pm_domain.h                     |   5 +
> >  include/linux/scmi_protocol.h                 |  18 ++-
> >  13 files changed, 293 insertions(+), 85 deletions(-)
> >  create mode 100644 drivers/genpd/arm/Makefile
> >  create mode 100644 drivers/genpd/arm/scmi_perf_domain.c
> >
> 
> Unless you have some additional comments, I think patch 1 -> 12 should
> be ready to be applied to your scmi tree, as is. I tried to apply it
> today and did not encounter any problem.
>

Sorry for the delay, was off few days last week. I will take a look at
the series later this week

> Patch 13 needs a rebase so I will submit a new version of it. For you
> to apply it to your tree, you need to move your scmi branch to
> v6.6-rc2 (on Monday), would that be okay for you to manage?
>

Sure I can rebase on -rc2. I assume Arnd is aware of the dependency and
must be OK with that. The general preference/expectation is -rc1 but I
understand the exception this time.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support
  2023-09-18 10:26   ` Sudeep Holla
@ 2023-09-19 10:24     ` Ulf Hansson
  0 siblings, 0 replies; 35+ messages in thread
From: Ulf Hansson @ 2023-09-19 10:24 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Cristian Marussi, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel, Viresh Kumar,
	Nishanth Menon, Stephen Boyd

On Mon, 18 Sept 2023 at 12:26, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Fri, Sep 15, 2023 at 12:45:02AM +0200, Ulf Hansson wrote:
> > Sudeep, Christian,
> >
> > On Fri, 25 Aug 2023 at 13:26, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > >
> > > Changes in v3:
> > >         - Re-based upon the for-next/scmi/updates branch.
> > >         - Re-ordered some of the patches in the series, to eas review.
> > >         - Added some new DT doc patches in the series, according to comments.
> > >         - Fixed other comments, see version history for each patch.
> > >
> > > Changes in v2:
> > >         - Split up the series, to get the basic support in place as the first
> > >         step. The part that remains is the integration with the OPP library, to
> > >         allow consumer drivers to change performance level using the OPP lib.
> > >         - Re-based on top v6.5-rc1.
> > >         - Other changes will be described for each patch.
> > >
> > > The current SCMI performance scaling support is limited to cpufreq. This series
> > > extends the support, so it can be used for all kind of devices and not only for
> > > CPUs.
> > >
> > > The changes are spread over a couple of different subsystems, although the
> > > changes that affects the other subsystems than the arm_scmi directory are
> > > mostly smaller, except for last patch which is in the new genpd directory.
> > >
> > > The series is based upon the for-next/scmi/updates branch, but to enable the
> > > genpd provider in patch 13 (the actual scmi performance domain driver) to be
> > > placed in the new genpd directory, I have also merged an immutable branch [1],
> > > which is queued for v6.6.
> > >
> > > Note that, I am runing this on the Qemu virt platform with Optee running an SCMI
> > > server. If you want some more details about my test setup, I can share this with
> > > you, just let me know.
> > >
> > > Looking forward to your feedback!
> > >
> > > Kind regards
> > > Ulf Hansson
> > >
> > > [1]
> > > git.kernel.org/pub/scm/linux/kernel/git/people/ulf.hansson/linux-pm.git genpd_create_dir
> > >
> > >
> > > Ulf Hansson (13):
> > >   firmware: arm_scmi: Extend perf protocol ops to get number of domains
> > >   firmware: arm_scmi: Extend perf protocol ops to get information of a
> > >     domain
> > >   cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
> > >   firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
> > >   firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
> > >   cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
> > >   cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
> > >   dt-bindings: arm: cpus: Add a power-domain-name for a
> > >     performance-domain
> > >   dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
> > >   dt-bindings: power: Clarify performance capabilities of power-domains
> > >   cpufreq: scmi: Add support to parse domain-id using
> > >     #power-domain-cells
> > >   PM: domains: Allow genpd providers to manage OPP tables directly by
> > >     its FW
> > >   genpd: arm: Add the SCMI performance domain
> > >
> > >  .../devicetree/bindings/arm/cpus.yaml         |   4 +-
> > >  .../bindings/firmware/arm,scmi.yaml           |  11 +-
> > >  .../bindings/power/power-domain.yaml          |  17 +-
> > >  MAINTAINERS                                   |   1 +
> > >  drivers/base/power/domain.c                   |  11 +-
> > >  drivers/cpufreq/scmi-cpufreq.c                |  55 +++++--
> > >  drivers/firmware/arm_scmi/Kconfig             |  12 ++
> > >  drivers/firmware/arm_scmi/perf.c              |  90 +++++------
> > >  drivers/genpd/Makefile                        |   1 +
> > >  drivers/genpd/arm/Makefile                    |   3 +
> > >  drivers/genpd/arm/scmi_perf_domain.c          | 150 ++++++++++++++++++
> > >  include/linux/pm_domain.h                     |   5 +
> > >  include/linux/scmi_protocol.h                 |  18 ++-
> > >  13 files changed, 293 insertions(+), 85 deletions(-)
> > >  create mode 100644 drivers/genpd/arm/Makefile
> > >  create mode 100644 drivers/genpd/arm/scmi_perf_domain.c
> > >
> >
> > Unless you have some additional comments, I think patch 1 -> 12 should
> > be ready to be applied to your scmi tree, as is. I tried to apply it
> > today and did not encounter any problem.
> >
>
> Sorry for the delay, was off few days last week. I will take a look at
> the series later this week
>
> > Patch 13 needs a rebase so I will submit a new version of it. For you
> > to apply it to your tree, you need to move your scmi branch to
> > v6.6-rc2 (on Monday), would that be okay for you to manage?
> >
>
> Sure I can rebase on -rc2. I assume Arnd is aware of the dependency and
> must be OK with that. The general preference/expectation is -rc1 but I
> understand the exception this time.

Thanks! And yes, I can confirm that Arnd is aware too.

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
  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-09-11 13:20   ` Rob Herring
@ 2023-09-21 11:11   ` Sudeep Holla
  2023-09-21 13:22     ` Ulf Hansson
  1 sibling, 1 reply; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 11:11 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Sudeep Holla, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, Lorenzo Pieralisi

On Fri, Aug 25, 2023 at 01:26:28PM +0200, Ulf Hansson wrote:
> When an CPU's performance domain is managed through the SCMI firmware,
> let's enable us describe this as a consumer of a power-domain provider,
> which is the de-facto standard to use for performance domains. In this
> case, let's specify a corresponding power-domain-name, to point out the
> corresponding index for it.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 
> Changes in v3:
> 	- New patch.

This patch and 10/13 are quite generic. I am happy to take it as part of
this series but just thought of checking again if that is what you prefer ?

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
  2023-08-25 11:26 ` [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe() Ulf Hansson
@ 2023-09-21 11:14   ` Sudeep Holla
  2023-09-21 13:02     ` Ulf Hansson
  0 siblings, 1 reply; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 11:14 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Sudeep Holla, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, Aug 25, 2023 at 01:26:27PM +0200, Ulf Hansson wrote:
> We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
> to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
> up the code a bit.
>

No exactly. The stub is under !CONFIG_OF but we need it for !CONFIG_COMMON_CLK.
The original build issue reported for which I add this was CONFIG_OF=y &&
CONFIG_COMMON_CLK=n.

It looks like it is still valid combo though I don't have a handy randconfig
to present to you. I prefer to drop this for now if that is OK with you.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells
  2023-08-25 11:26 ` [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells Ulf Hansson
@ 2023-09-21 11:17   ` Sudeep Holla
  2023-09-21 14:30   ` Viresh Kumar
  1 sibling, 0 replies; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 11:17 UTC (permalink / raw)
  To: Ulf Hansson, Viresh Kumar
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel

Hi Viresh,

On Fri, Aug 25, 2023 at 01:26:31PM +0200, Ulf Hansson wrote:
> The performance domain-id can be described in DT using the power-domains
> property or the clock property. The latter is already supported, so let's
> add support for the power-domains too.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v3:
> 	- Move to get the power-domain index from power-domain-names.
>

Can you please provide you ack for all the scmi-cpufreq related changes
in this series to take it via arm-soc tree ?

--
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW
  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-09-21 11:20   ` Sudeep Holla
  2023-09-21 13:05     ` Ulf Hansson
  0 siblings, 1 reply; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 11:20 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Sudeep Holla, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, Aug 25, 2023 at 01:26:32PM +0200, Ulf Hansson wrote:
> In some cases the OPP tables aren't specified in device tree, but rather
> encoded in the FW. To allow a genpd provider to specify them dynamically
> instead, let's add a new genpd flag, GENPD_FLAG_OPP_TABLE_FW.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 
> Changes in v3:
> 	- None.
> 

Just checking if I need Rafael's ack here or that is OK as you are
co-maintainer ? Again asking explicitly to ensure arm-soc is happy when
I send PR.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
  2023-09-21 11:14   ` Sudeep Holla
@ 2023-09-21 13:02     ` Ulf Hansson
  2023-09-21 13:29       ` Sudeep Holla
  0 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-09-21 13:02 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel

On Thu, 21 Sept 2023 at 13:14, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Fri, Aug 25, 2023 at 01:26:27PM +0200, Ulf Hansson wrote:
> > We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
> > to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
> > up the code a bit.
> >
>
> No exactly. The stub is under !CONFIG_OF but we need it for !CONFIG_COMMON_CLK.
> The original build issue reported for which I add this was CONFIG_OF=y &&
> CONFIG_COMMON_CLK=n.
>
> It looks like it is still valid combo though I don't have a handy randconfig
> to present to you. I prefer to drop this for now if that is OK with you.

Sure, it's perfectly fine to drop it. It's just a thing I stumbled
over that isn't really needed in the $subject series!

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW
  2023-09-21 11:20   ` Sudeep Holla
@ 2023-09-21 13:05     ` Ulf Hansson
  2023-09-21 13:30       ` Sudeep Holla
  0 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-09-21 13:05 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel

On Thu, 21 Sept 2023 at 13:20, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Fri, Aug 25, 2023 at 01:26:32PM +0200, Ulf Hansson wrote:
> > In some cases the OPP tables aren't specified in device tree, but rather
> > encoded in the FW. To allow a genpd provider to specify them dynamically
> > instead, let's add a new genpd flag, GENPD_FLAG_OPP_TABLE_FW.
> >
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >
> > Changes in v3:
> >       - None.
> >
>
> Just checking if I need Rafael's ack here or that is OK as you are
> co-maintainer ? Again asking explicitly to ensure arm-soc is happy when
> I send PR.

This should be fine for you to pick up. Rafael would have objected if
this was something that he didn't like. Moreover, there's no other
patches being queued for genpd at this moment so no worries of
conflicts.

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
  2023-09-21 11:11   ` Sudeep Holla
@ 2023-09-21 13:22     ` Ulf Hansson
  2023-09-21 13:35       ` Sudeep Holla
  0 siblings, 1 reply; 35+ messages in thread
From: Ulf Hansson @ 2023-09-21 13:22 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, Lorenzo Pieralisi

On Thu, 21 Sept 2023 at 13:11, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Fri, Aug 25, 2023 at 01:26:28PM +0200, Ulf Hansson wrote:
> > When an CPU's performance domain is managed through the SCMI firmware,
> > let's enable us describe this as a consumer of a power-domain provider,
> > which is the de-facto standard to use for performance domains. In this
> > case, let's specify a corresponding power-domain-name, to point out the
> > corresponding index for it.
> >
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> > Cc: Conor Dooley <conor+dt@kernel.org>
> > Cc: devicetree@vger.kernel.org
> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >
> > Changes in v3:
> >       - New patch.
>
> This patch and 10/13 are quite generic. I am happy to take it as part of
> this series but just thought of checking again if that is what you prefer ?

Yes please, go ahead and pick this up through your scmi tree.

Kind regards
Uffe

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 07/13] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
  2023-09-21 13:02     ` Ulf Hansson
@ 2023-09-21 13:29       ` Sudeep Holla
  0 siblings, 0 replies; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 13:29 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel

On Thu, Sep 21, 2023 at 03:02:16PM +0200, Ulf Hansson wrote:
> On Thu, 21 Sept 2023 at 13:14, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Fri, Aug 25, 2023 at 01:26:27PM +0200, Ulf Hansson wrote:
> > > We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
> > > to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
> > > up the code a bit.
> > >
> >
> > No exactly. The stub is under !CONFIG_OF but we need it for !CONFIG_COMMON_CLK.
> > The original build issue reported for which I add this was CONFIG_OF=y &&
> > CONFIG_COMMON_CLK=n.
> >
> > It looks like it is still valid combo though I don't have a handy randconfig
> > to present to you. I prefer to drop this for now if that is OK with you.
> 
> Sure, it's perfectly fine to drop it. It's just a thing I stumbled
> over that isn't really needed in the $subject series!
> 

Thanks !

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW
  2023-09-21 13:05     ` Ulf Hansson
@ 2023-09-21 13:30       ` Sudeep Holla
  0 siblings, 0 replies; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 13:30 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel

On Thu, Sep 21, 2023 at 03:05:17PM +0200, Ulf Hansson wrote:
> On Thu, 21 Sept 2023 at 13:20, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Fri, Aug 25, 2023 at 01:26:32PM +0200, Ulf Hansson wrote:
> > > In some cases the OPP tables aren't specified in device tree, but rather
> > > encoded in the FW. To allow a genpd provider to specify them dynamically
> > > instead, let's add a new genpd flag, GENPD_FLAG_OPP_TABLE_FW.
> > >
> > > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > > ---
> > >
> > > Changes in v3:
> > >       - None.
> > >
> >
> > Just checking if I need Rafael's ack here or that is OK as you are
> > co-maintainer ? Again asking explicitly to ensure arm-soc is happy when
> > I send PR.
> 
> This should be fine for you to pick up. Rafael would have objected if
> this was something that he didn't like. Moreover, there's no other
> patches being queued for genpd at this moment so no worries of
> conflicts.
> 

Fair enough :), but I just wanted to confirm.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
  2023-09-21 13:22     ` Ulf Hansson
@ 2023-09-21 13:35       ` Sudeep Holla
  0 siblings, 0 replies; 35+ messages in thread
From: Sudeep Holla @ 2023-09-21 13:35 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Nikunj Kela, Prasad Sodagudi, Alexandre Torgue, linux-pm,
	linux-arm-kernel, linux-kernel, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, Lorenzo Pieralisi

On Thu, Sep 21, 2023 at 03:22:54PM +0200, Ulf Hansson wrote:
> On Thu, 21 Sept 2023 at 13:11, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Fri, Aug 25, 2023 at 01:26:28PM +0200, Ulf Hansson wrote:
> > > When an CPU's performance domain is managed through the SCMI firmware,
> > > let's enable us describe this as a consumer of a power-domain provider,
> > > which is the de-facto standard to use for performance domains. In this
> > > case, let's specify a corresponding power-domain-name, to point out the
> > > corresponding index for it.
> > >
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> > > Cc: Conor Dooley <conor+dt@kernel.org>
> > > Cc: devicetree@vger.kernel.org
> > > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > > ---
> > >
> > > Changes in v3:
> > >       - New patch.
> >
> > This patch and 10/13 are quite generic. I am happy to take it as part of
> > this series but just thought of checking again if that is what you prefer ?
> 
> Yes please, go ahead and pick this up through your scmi tree.
> 

Thanks, I just need Viresh's ack for cpufreq changes, we are otherwise all
set with the series. I will pull once I have his ack.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
  2023-08-25 11:26 ` [PATCH v3 03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq Ulf Hansson
@ 2023-09-21 14:28   ` Viresh Kumar
  0 siblings, 0 replies; 35+ messages in thread
From: Viresh Kumar @ 2023-09-21 14:28 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, 25 Aug 2023 at 13:27, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> The OF parsing of the clock domain specifier seems to better belong in the
> scmi cpufreq driver, rather than being implemented behind the generic
> ->device_domain_id() perf protocol ops.
>
> To prepare to remove the ->device_domain_id() ops, let's implement the OF
> parsing in the scmi cpufreq driver instead.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v3:
>         - Re-based.
>
> ---
>  drivers/cpufreq/scmi-cpufreq.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 04/13] firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
  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-09-21 14:29   ` Viresh Kumar
  0 siblings, 0 replies; 35+ messages in thread
From: Viresh Kumar @ 2023-09-21 14:29 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, 25 Aug 2023 at 13:27, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> 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>
> ---
>
> Changes in v3:
>         - Re-based.
>
> ---
>  drivers/cpufreq/scmi-cpufreq.c   | 14 +++++++++-----

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
  2023-08-25 11:26 ` [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus() Ulf Hansson
@ 2023-09-21 14:29   ` Viresh Kumar
  0 siblings, 0 replies; 35+ messages in thread
From: Viresh Kumar @ 2023-09-21 14:29 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, 25 Aug 2023 at 13:27, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> The domain-id for the cpu_dev has already been parsed at the point when
> scmi_get_sharing_cpus() is getting called. Let's pass it as an in-parameter
> to avoid the unnecessary OF parsing.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v3:
>         - None.
>
> ---
>  drivers/cpufreq/scmi-cpufreq.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells
  2023-08-25 11:26 ` [PATCH v3 11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells Ulf Hansson
  2023-09-21 11:17   ` Sudeep Holla
@ 2023-09-21 14:30   ` Viresh Kumar
  1 sibling, 0 replies; 35+ messages in thread
From: Viresh Kumar @ 2023-09-21 14:30 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sudeep Holla, Cristian Marussi, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, 25 Aug 2023 at 13:27, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> The performance domain-id can be described in DT using the power-domains
> property or the clock property. The latter is already supported, so let's
> add support for the power-domains too.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v3:
>         - Move to get the power-domain index from power-domain-names.
>
> ---
>  drivers/cpufreq/scmi-cpufreq.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)


Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support
  2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
                   ` (13 preceding siblings ...)
  2023-09-14 22:45 ` [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
@ 2023-09-25  9:39 ` Sudeep Holla
  14 siblings, 0 replies; 35+ messages in thread
From: Sudeep Holla @ 2023-09-25  9:39 UTC (permalink / raw)
  To: Cristian Marussi, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Ulf Hansson
  Cc: Sudeep Holla, Nikunj Kela, Prasad Sodagudi, Alexandre Torgue,
	linux-pm, linux-arm-kernel, linux-kernel

On Fri, 25 Aug 2023 13:26:20 +0200, Ulf Hansson wrote:
> Changes in v3:
> 	- Re-based upon the for-next/scmi/updates branch.
> 	- Re-ordered some of the patches in the series, to eas review.
> 	- Added some new DT doc patches in the series, according to comments.
> 	- Fixed other comments, see version history for each patch.
> 
> Changes in v2:
> 	- Split up the series, to get the basic support in place as the first
> 	step. The part that remains is the integration with the OPP library, to
> 	allow consumer drivers to change performance level using the OPP lib.
> 	- Re-based on top v6.5-rc1.
> 	- Other changes will be described for each patch.
> 
> [...]

Applied to sudeep.holla/linux (for-next/scmi/updates), thanks!

[01/13] firmware: arm_scmi: Extend perf protocol ops to get number of domains
        https://git.kernel.org/sudeep.holla/c/e9090e70e618
[02/13] firmware: arm_scmi: Extend perf protocol ops to get information of a domain
        https://git.kernel.org/sudeep.holla/c/3d99ed60721b
[03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq
        https://git.kernel.org/sudeep.holla/c/e336baa4193e
[04/13] firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
        https://git.kernel.org/sudeep.holla/c/39dfa5b9e1f0
[05/13] firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
        https://git.kernel.org/sudeep.holla/c/9b578d83629e
[06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus()
        https://git.kernel.org/sudeep.holla/c/4f1f0bc8ed16
[08/13] dt-bindings: arm: cpus: Add a power-domain-name for a performance-domain
        https://git.kernel.org/sudeep.holla/c/6e429adc60b1
[09/13] dt-bindings: firmware: arm,scmi: Extend bindings for protocol@13
        https://git.kernel.org/sudeep.holla/c/e11c480b6df1
[10/13] dt-bindings: power: Clarify performance capabilities of power-domains
        https://git.kernel.org/sudeep.holla/c/0ead1f3e158c
[11/13] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells
        https://git.kernel.org/sudeep.holla/c/92b2028b00ff
[12/13] PM: domains: Allow genpd providers to manage OPP tables directly by its FW
        https://git.kernel.org/sudeep.holla/c/3dd91515ef43

--
Regards,
Sudeep


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2023-09-25  9:40 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 11:26 [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
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 ` [PATCH v3 03/13] cpufreq: scmi: Prepare to move OF parsing of domain-id to cpufreq Ulf Hansson
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-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 ` [PATCH v3 06/13] cpufreq: scmi: Avoid one OF parsing in scmi_get_sharing_cpus() Ulf Hansson
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-09-21 11:14   ` Sudeep Holla
2023-09-21 13:02     ` Ulf Hansson
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-09-11 13:20   ` Rob Herring
2023-09-21 11:11   ` Sudeep Holla
2023-09-21 13:22     ` Ulf Hansson
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-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-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-09-21 11:17   ` Sudeep Holla
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-09-21 11:20   ` Sudeep Holla
2023-09-21 13:05     ` Ulf Hansson
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-09-14 22:45 ` [PATCH v3 00/13] arm_scmi/cpufreq: Add generic performance scaling support Ulf Hansson
2023-09-18 10:26   ` Sudeep Holla
2023-09-19 10:24     ` Ulf Hansson
2023-09-25  9:39 ` Sudeep Holla

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).