From: Cristian Marussi <cristian.marussi@arm.com>
To: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
linux-fsdevel@vger.kernel.org, sudeep.holla@arm.com,
james.quinlan@broadcom.com, f.fainelli@gmail.com,
vincent.guittot@linaro.org, etienne.carriere@st.com,
peng.fan@oss.nxp.com, michal.simek@amd.com,
dan.carpenter@linaro.org, d-gole@ti.com, elif.topuz@arm.com,
lukasz.luba@arm.com, philip.radford@arm.com,
souvik.chakravarty@arm.com
Subject: Re: [PATCH v2 04/17] uapi: Add ARM SCMI definitions
Date: Mon, 19 Jan 2026 15:51:23 +0000 [thread overview]
Message-ID: <aW5S--P1EoV3y9kU@pluto> (raw)
In-Reply-To: <20260119114343.00003f07@huawei.com>
On Mon, Jan 19, 2026 at 11:43:43AM +0000, Jonathan Cameron wrote:
> On Wed, 14 Jan 2026 11:46:08 +0000
> Cristian Marussi <cristian.marussi@arm.com> wrote:
>
> > Add a number of structures and ioctls definitions used by the ARM
> > SCMI Telemetry protocol.
> >
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
>
> A few drive by comments.
Hi,
>
> > diff --git a/include/uapi/linux/scmi.h b/include/uapi/linux/scmi.h
> > new file mode 100644
> > index 000000000000..e4e9939a1bf8
> > --- /dev/null
> > +++ b/include/uapi/linux/scmi.h
> > @@ -0,0 +1,287 @@
> > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> > +/*
> > + * Copyright (C) 2026 ARM Ltd.
> > + */
> > +#ifndef _UAPI_LINUX_SCMI_H
> > +#define _UAPI_LINUX_SCMI_H
> > +
> > +/*
> > + * Userspace interface SCMI Telemetry
> > + */
> > +
> > +#include <linux/ioctl.h>
> > +#include <linux/types.h>
>
>
> > +/**
> > + * scmi_tlm_intervals - Update intervals descriptor
> > + *
> > + * @discrete: Flag to indicate the nature of the intervals described in
> > + * @update_intervals.
> > + * When 'false' @update_intervals is a triplet: min/max/step
> > + * @pad: Padding fields to enforce alignment.
> > + * @num: Number of entries of @update_intervals
> > + * @update_intervals: A variably-sized array containing the update intervals
> > + *
> > + * Used by:
> > + * RW - SCMI_TLM_GET_INTRVS
> > + *
> > + * Supported by:
> > + * control/
> > + * groups/<N>/control
> > + */
> > +struct scmi_tlm_intervals {
> > + __u8 discrete;
> > + __u8 pad[3];
> > + __u32 num;
>
> Trivial but this seems a little inconsistent. In other
> 'num' entries (e.g. num_des) below a more specific name
> is used.
Yes, agreed. I will fix.
>
> > +#define SCMI_TLM_UPDATE_INTVL_SEGMENT_LOW 0
> > +#define SCMI_TLM_UPDATE_INTVL_SEGMENT_HIGH 1
> > +#define SCMI_TLM_UPDATE_INTVL_SEGMENT_STEP 2
> > + __u32 update_intervals[] __counted_by(num);
> > +};
>
> > +
> > +/**
> > + * scmi_tlm_des_list - List of all defined DEs
> > + *
> > + * @num_des: Number of entries in @des
> > + * @des: An array containing descriptors for all defined DEs
> > + *
> > + * Used by:
> > + * RW - SCMI_TLM_GET_DE_LIST
> > + *
> > + * Supported by:
> > + * control/
> > + */
> > +struct scmi_tlm_des_list {
> > + __u32 num_des;
> > + struct scmi_tlm_de_info des[] __counted_by(num_des);
> > +};
> > +
> > +/**
> > + * scmi_tlm_de_sample - A DE reading
> > + *
> > + * @id: DE identifier
> > + * @tstamp: DE reading timestamp (equal 0 is NOT supported)
> > + * @val: Reading of the DE data value
> > + *
> > + * Used by:
> > + * RW - SCMI_TLM_GET_DE_VALUE
> > + *
> > + * Supported by:
> > + * control/
> > + */
> > +struct scmi_tlm_de_sample {
> > + __u32 id;
>
> Packing issues maybe if this ever ends up on 32 bit machines.
> Even more so once it's in an array below.
>
Oh yes, I missed this...
> > + __u64 tstamp;
> > + __u64 val;
> > +};
> > +
Thanks,
Cristian
next prev parent reply other threads:[~2026-01-19 15:51 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 11:46 [PATCH v2 00/17] Introduce SCMI Telemetry FS support Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 01/17] firmware: arm_scmi: Define a common SCMI_MAX_PROTOCOLS value Cristian Marussi
2026-01-19 11:18 ` Jonathan Cameron
2026-01-19 15:43 ` Cristian Marussi
2026-01-20 6:44 ` Dhruva Gole
2026-01-20 10:55 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 02/17] firmware: arm_scmi: Reduce the scope of protocols mutex Cristian Marussi
2026-01-19 11:21 ` Jonathan Cameron
2026-01-19 15:45 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 03/17] firmware: arm_scmi: Allow protocols to register for notifications Cristian Marussi
2026-01-19 11:33 ` Jonathan Cameron
2026-01-19 15:49 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 04/17] uapi: Add ARM SCMI definitions Cristian Marussi
2026-01-19 11:43 ` Jonathan Cameron
2026-01-19 15:51 ` Cristian Marussi [this message]
2026-01-14 11:46 ` [PATCH v2 05/17] firmware: arm_scmi: Add Telemetry protocol support Cristian Marussi
2026-01-19 16:29 ` Jonathan Cameron
2026-01-19 18:25 ` Cristian Marussi
2026-01-23 11:00 ` Elif Topuz
2026-03-26 13:32 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 06/17] include: trace: Add Telemetry trace events Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 07/17] firmware: arm_scmi: Use new Telemetry traces Cristian Marussi
2026-01-16 20:01 ` kernel test robot
2026-01-23 11:43 ` Elif Topuz
2026-03-26 15:35 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 08/17] firmware: arm_scmi: Add System Telemetry driver Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 09/17] fs/stlmfs: Document ARM SCMI Telemetry filesystem Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 10/17] firmware: arm_scmi: Add System Telemetry ioctls support Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 11/17] fs/stlmfs: Document alternative ioctl based binary interface Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 12/17] firmware: arm_scmi: Add Telemetry components view Cristian Marussi
2026-01-16 13:35 ` Elif Topuz
2026-01-19 15:42 ` Cristian Marussi
2026-01-16 22:02 ` kernel test robot
2026-01-19 6:39 ` Dan Carpenter
2026-01-19 16:07 ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 13/17] fs/stlmfs: Document alternative topological view Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 14/17] [RFC] docs: stlmfs: Document ARM SCMI Telemetry FS ABI Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 15/17] [RFC] firmware: arm_scmi: Add lazy population support to Telemetry FS Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 16/17] fs/stlmfs: Document lazy mode and related mount option Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 17/17] [RFC] tools/scmi: Add SCMI Telemetry testing tool Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aW5S--P1EoV3y9kU@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=d-gole@ti.com \
--cc=dan.carpenter@linaro.org \
--cc=elif.topuz@arm.com \
--cc=etienne.carriere@st.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=michal.simek@amd.com \
--cc=peng.fan@oss.nxp.com \
--cc=philip.radford@arm.com \
--cc=souvik.chakravarty@arm.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.