Thread (48 messages) 48 messages, 6 authors, 2026-03-03

Re: [PATCH 09/11] firmware: arm_scmi: Add bound iterators support

From: Cristian Marussi <cristian.marussi@arm.com>
Date: 2026-02-28 10:42:12
Also in: arm-scmi, linux-clk, linux-renesas-soc, lkml

On Sat, Feb 28, 2026 at 02:43:47AM +0000, Peng Fan (OSS) wrote:
quoted
Subject: Re: [PATCH 09/11] firmware: arm_scmi: Add bound iterators
support

On Fri, Feb 27, 2026 at 03:32:23PM +0000, Cristian Marussi wrote:
quoted
SCMI core stack provides some common helpers to handle in a unified
way
quoted
multipart message replies: such iterator-helpers, when run, currently
process by default the whole set of discovered resources.

Introduce an alternative way to run the initialized iterator on a
limited range of resources.

Note that the subset of resources that can be chosen is anyway
limited
quoted
by the SCMI protocol specification, since you are only allowed to
choose the startindex on a multi-part enumeration NOT the end index,
so
quoted
that the effective number of returned items by a bound iterators
depends really on platform side decisions.

Suggested-by: Etienne Carriere <redacted>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
drivers/firmware/arm_scmi/clock.c     |  3 +-
drivers/firmware/arm_scmi/driver.c    | 58 +++++++++++++++++++------
--
quoted
drivers/firmware/arm_scmi/protocols.h | 13 +++++-
3 files changed, 55 insertions(+), 19 deletions(-)
diff --git a/drivers/firmware/arm_scmi/clock.c
b/drivers/firmware/arm_scmi/clock.c
index 15faa79abed4..d7df5c45836e 100644
--- a/drivers/firmware/arm_scmi/clock.c
+++ b/drivers/firmware/arm_scmi/clock.c
@@ -505,8 +505,7 @@ iter_clk_describe_process_response(const
struct scmi_protocol_handle *ph,
quoted
	struct scmi_clk_ipriv *p = priv;
	const struct scmi_msg_resp_clock_describe_rates *r =
response;
quoted
-	p->clkd->rates[st->desc_index + st->loop_idx] =
-		RATE_TO_U64(r->rate[st->loop_idx]);
+	p->clkd->rates[p->clkd->num_rates] =
+RATE_TO_U64(r->rate[st->loop_idx]);
Seems irrelevant
Ignore this. I understand wrong.
Yeah...I will double check BUT the aim is to proper behaving while
filling up the vector when doing only a partial discovery with bound
iterators...in that case you want to fill probably only a subset of the
available slots in order like [0]:min, [1]:max...

Thanks,
Cristian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help