Re: [PATCH v10 14/24] firmware: arm_scmi: Add Telemetry generation counter event
From: Fayssal Benmlih
Date: Fri Aug 21 2026 - 11:22:46 EST
Hi Cristian,
The generation update issue reported on V7 appears unchanged in V10.
scmi_telemetry_generation_update() still performs:
next = (atomic_read(&ti->info.generation) + 1) ?:
SCMI_TLM_GENERATION_ONE;
followed by a separate atomic_set_release().
The read and update are not one atomic operation, so concurrent callers can
read the same generation and both store the same next value. The addition
is also evaluated using the signed value returned by atomic_read(), making
the INT_MAX transition problematic even though the intended counter has
u32 wrap semantics.
Serializing system-driver ioctls reduces some callers, but this helper is
part of the protocol implementation and should be correct independently of
that consumer.
Please use an atomic update or cmpxchg loop with explicit unsigned wrap and
zero-skipping semantics.
Thanks,
Fayçal