Re: [PATCH v10 23/24] [RFC] Documentation: Add SCMI System Telemetry documentation
Fayssal Benmlih <[email protected]>
| Newsgroups | org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Cristian,
Most of the documentation details reported on V7 still appear to be
outstanding.
Please explain the distinction between abi_features and the SCMI instance
features. For example, reset is usable only when both the ABI and firmware
instance advertise support.
The configuration section should state that configuration is global to the
SCMI instance rather than per-open-file state. It should also define:
- concurrent-caller behavior;
- partial failure of SET_CFG, SET_ALL_CFG and batched operations;
- which operations require a writable fd or privilege;
- what userspace can rely on after a partially successful request.
The event section should define subscription ownership and lifetime,
including what happens when the telemetry fd or eventfd is closed, who may
cancel a cookie, and what happens during driver removal.
The SHMTI mmap ABI still needs to specify:
- the exact PAGE_ALIGN(offset + len) mapping length;
- permitted vm_pgoff, protection and sharing flags;
- that returned fds are read-only and close-on-exec;
- cacheability and coherency expectations;
- fd and VMA lifetime across removal, reset and reconfiguration;
- cleanup using munmap() and close();
- security requirements for bytes surrounding an unaligned SHMTI.
Please also document the permitted update-interval secs/exp ranges and how a
requested value is matched against discrete or segmented intervals.
The example is still using the pre-batch request type:
struct scmi_tlm_data_read data = {};
...
ioctl(fd, SCMI_TLM_BATCH_READ, &data);
The V10 command expects struct scmi_tlm_batch, including item_sz, items and
the optional states pointer. Please update the example accordingly.
The timestamp domain, clock-rate conversion, wrap behavior, and whether a
timestamp can be correlated with a Linux clock also remain undocumented.
Finally, the example leaks fd on successful and most error exits. Please
use one cleanup path and demonstrate closing the device and anonymous fds,
unmapping SHMTIs, and freeing batch arrays.
Thanks,
Fayçal