From: Cristian Marussi <cristian.marussi@arm.com>
To: Elif Topuz <elif.topuz@arm.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,
jonathan.cameron@huawei.com, lukasz.luba@arm.com,
philip.radford@arm.com, souvik.chakravarty@arm.com
Subject: Re: [PATCH v2 12/17] firmware: arm_scmi: Add Telemetry components view
Date: Mon, 19 Jan 2026 15:42:03 +0000 [thread overview]
Message-ID: <aW5Qy22usmoxVfBE@pluto> (raw)
In-Reply-To: <c720119f-0991-4112-a080-829a7b2de908@arm.com>
On Fri, Jan 16, 2026 at 01:35:00PM +0000, Elif Topuz wrote:
>
> Hi Cristian,
H Elif,
>
> On 14/01/2026 11:46, Cristian Marussi wrote:
> > Add an alternative filesystem view for the discovered Data Events, where
> > the tree of DEs is laid out following the discovered topological order
> > instead of the existing flat layout.
> >
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> > v1 --> v2
> > - Use new FS API
> > - Introduce new stlmfs_lookup_by_name helper
> > ---
> > .../firmware/arm_scmi/scmi_system_telemetry.c | 684 ++++++++++++++++++
> > 1 file changed, 684 insertions(+)
> >
> > diff --git a/drivers/firmware/arm_scmi/scmi_system_telemetry.c b/drivers/firmware/arm_scmi/scmi_system_telemetry.c
> > index 721de615bec3..1221520356fd 100644
> > --- a/drivers/firmware/arm_scmi/scmi_system_telemetry.c
> > +++ b/drivers/firmware/arm_scmi/scmi_system_telemetry.c
> > @@ -174,6 +174,7 @@ struct scmi_tlm_inode {
> > * @top_dentry: A reference to the top dentry for this instance.
> > * @des_dentry: A reference to the DES dentry for this instance.
> > * @grps_dentry: A reference to the groups dentry for this instance.
> > + * @compo_dentry: A reference to the components dentry for this instance.
> > * @info: A handy reference to this instance SCMI Telemetry info data.
> > *
> > */
> > @@ -188,6 +189,7 @@ struct scmi_tlm_instance {
> > struct dentry *top_dentry;
> > struct dentry *des_dentry;
> > struct dentry *grps_dentry;
> > + struct dentry *compo_dentry;
> > const struct scmi_telemetry_info *info;
> > };
> >
> > @@ -196,6 +198,526 @@ static int scmi_telemetry_instance_register(struct super_block *sb,
> >
> > static LIST_HEAD(scmi_telemetry_instances);
> >
> > +#define TYPES_ARRAY_SZ 256
> > +
> > +static const char *compo_types[TYPES_ARRAY_SZ] = {
> > + "unspec",
> > + "cpu",
> > + "cluster",
> > + "gpu",
> > + "npu",
> > + "interconnnect",
> > + "mem_cntrl",
> > + "l1_cache",
> > + "l2_cache",
> > + "l3_cache",
> > + "ll_cache",
> > + "sys_cache",
> > + "disp_cntrl",
> > + "ipu",
> > + "chiplet",
> > + "package",
> > + "soc",
> > + "system",
> > + "smcu",
> > + "accel",
> > + "battery",
> > + "charger",
> > + "pmic",
> > + "board",
> > + "memory",
> > + "periph",
> > + "periph_subc",
> > + "lid",
> > + "display",
> > + "res_29",
> > + "res_30",
> > + "res_31",
> > + "res_32",
> > + "res_33",
> > + "res_34",
> > + "res_35",
> > + "res_36",
> > + "res_37",
> > + "res_38",
> > + "res_39",
> > + "res_40",
> > + "res_41",
> > + "res_42",
> > + "res_43",
> > + "res_44",
> > + "res_45",
> > + "res_46",
> > + "res_47",
> > + "res_48",
> > + "res_49",
> > + "res_50",
> > + "res_51",
> > + "res_52",
> > + "res_53",
> > + "res_54",
> > + "res_55",
> > + "res_56",
> > + "res_57",
> > + "res_58",
> > + "res_59",
> > + "res_60",
> > + "res_61",
> > + "res_62",
> > + "res_63",
> > + "res_64",
> > + "res_65",
> > + "res_66",
> > + "res_67",
> > + "res_68",
> > + "res_69",
> > + "res_70",
> > + "res_71",
> > + "res_72",
> > + "res_73",
> > + "res_74",
> > + "res_75",
> > + "res_76",
> > + "res_77",
> > + "res_78",
> > + "res_79",
> > + "res_80",
> > + "res_81",
> > + "res_82",
> > + "res_83",
> > + "res_84",
> > + "res_85",
> > + "res_86",
> > + "res_87",
> > + "res_88",
> > + "res_89",
> > + "res_90",
> > + "res_91",
> > + "res_92",
> > + "res_93",
> > + "res_94",
> > + "res_95",
> > + "res_96",
> > + "res_97",
> > + "res_98",
> > + "res_99",
> > + "res_100",
> > + "res_101",
> > + "res_102",
> > + "res_103",
> > + "res_104",
> > + "res_105",
> > + "res_106",
> > + "res_107",
> > + "res_108",
> > + "res_109",
> > + "res_110",
> > + "res_111",
> > + "res_112",
> > + "res_113",
> > + "res_114",
> > + "res_115",
> > + "res_116",
> > + "res_117",
> > + "res_118",
> > + "res_119",
> > + "res_120",
> > + "res_121",
> > + "res_122",
> > + "res_123",
> > + "res_124",
> > + "res_125",
> > + "res_126",
> > + "res_127",
> > + "res_128",
> > + "res_129",
> > + "res_130",
> > + "res_131",
> > + "res_132",
> > + "res_133",
> > + "res_134",
> > + "res_135",
> > + "res_136",
> > + "res_137",
> > + "res_138",
> > + "res_139",
> > + "res_140",
> > + "res_141",
> > + "res_142",
> > + "res_143",
> > + "res_144",
> > + "res_145",
> > + "res_146",
> > + "res_147",
> > + "res_148",
> > + "res_149",
> > + "res_150",
> > + "res_151",
> > + "res_152",
> > + "res_153",
> > + "res_154",
> > + "res_155",
> > + "res_156",
> > + "res_157",
> > + "res_158",
> > + "res_159",
> > + "res_160",
> > + "res_161",
> > + "res_162",
> > + "res_163",
> > + "res_164",
> > + "res_165",
> > + "res_166",
> > + "res_167",
> > + "res_168",
> > + "res_169",
> > + "res_170",
> > + "res_171",
> > + "res_172",
> > + "res_173",
> > + "res_174",
> > + "res_175",
> > + "res_176",
> > + "res_177",
> > + "res_178",
> > + "res_179",
> > + "res_180",
> > + "res_181",
> > + "res_182",
> > + "res_183",
> > + "res_184",
> > + "res_185",
> > + "res_186",
> > + "res_187",
> > + "res_188",
> > + "res_189",
> > + "res_190",
> > + "res_191",
> > + "res_192",
> > + "res_193",
> > + "res_194",
> > + "res_195",
> > + "res_196",
> > + "res_197",
> > + "res_198",
> > + "res_199",
> > + "res_200",
> > + "res_201",
> > + "res_202",
> > + "res_203",
> > + "res_204",
> > + "res_205",
> > + "res_206",
> > + "res_207",
> > + "res_208",
> > + "res_209",
> > + "res_210",
> > + "res_211",
> > + "res_212",
> > + "res_213",
> > + "res_214",
> > + "res_215",
> > + "res_216",
> > + "res_217",
> > + "res_218",
> > + "res_219",
> > + "res_220",
> > + "res_221",
> > + "res_222",
> > + "res_223",
> > + "oem_224",
> > + "oem_225",
> > + "oem_226",
> > + "oem_227",
> > + "oem_228",
> > + "oem_229",
> > + "oem_230",
> > + "oem_231",
> > + "oem_232",
> > + "oem_233",
> > + "oem_234",
> > + "oem_235",
> > + "oem_236",
> > + "oem_237",
> > + "oem_238",
> > + "oem_239",
> > + "oem_240",
> > + "oem_241",
> > + "oem_242",
> > + "oem_243",
> > + "oem_244",
> > + "oem_245",
> > + "oem_246",
> > + "oem_247",
> > + "oem_248",
> > + "oem_249",
> > + "oem_250",
> > + "oem_251",
> > + "oem_252",
> > + "oem_253",
> > + "oem_254",
> > + "oem_255",
> > +};
> > +
> > +static const char *unit_types[TYPES_ARRAY_SZ] = {
> > + "none",
> > + "unspec",
> > + "celsius",
> > + "fahrenheit",
> > + "kelvin",
> > + "volts",
> > + "amps",
> > + "watts",
> > + "joules",
> > + "coulombs",
> > + "va",
> > + "nits",
> > + "lumens",
> > + "lux",
> > + "candelas",
> > + "kpa",
> > + "psi",
> > + "newtons",
> > + "cfm",
> > + "rpm",
> > + "hertz",
> > + "seconds",
> > + "minutes",
> > + "hours",
> > + "days",
> > + "weeks",
> > + "mils",
> > + "inches",
> > + "feet",
> > + "cubic_inches",
> > + "cubic_feet",
> > + "meters",
> > + "cubic_centimeters",
> > + "cubic_meters",
> > + "liters",
> > + "fluid_ounces",
> > + "radians",
> > + "steradians",
> > + "revolutions",
> > + "cycles",
> > + "gravities",
> > + "ounces",
> > + "pounds",
> > + "foot_pounds",
> > + "ounce_inches",
> > + "gauss",
> > + "gilberts",
> > + "henries",
> > + "farads",
> > + "ohms",
> > + "siemens",
> > + "moles",
> > + "becquerels",
> > + "ppm",
> > + "decibels",
> > + "dba",
> > + "dbc",
> > + "grays",
> > + "sieverts",
> > + "color_temp_kelvin",
> > + "bits",
> > + "bytes",
> > + "words",
> > + "dwords",
> > + "qwords",
> > + "percentage",
> > + "pascals",
> > + "counts",
> > + "grams",
> > + "newton_meters",
> > + "hits",
> > + "misses",
> > + "retries",
> > + "overruns",
> > + "underruns",
> > + "collisions",
> > + "packets",
> > + "messages",
> > + "chars",
> > + "errors",
> > + "corrected_err",
> > + "uncorrectable_err",
> > + "square_mils",
> > + "square_inches",
> > + "square_feet",
> > + "square_centimeters",
> > + "square_meters",
> > + "radians_per_secs",
> > + "beats_per_minute",
> > + "meters_per_secs_squared",
> > + "meters_per_secs",
> > + "cubic_meter_per_secs",
> > + "millimeters_mercury",
> > + "radians_per_secs_squared",
> > + "state",
> > + "bps",
> > + "res_96",
> > + "res_97",
> > + "res_98",
> > + "res_99",
> > + "res_100",
> > + "res_101",
> > + "res_102",
> > + "res_103",
> > + "res_104",
> > + "res_105",
> > + "res_106",
> > + "res_107",
> > + "res_108",
> > + "res_109",
> > + "res_110",
> > + "res_111",
> > + "res_112",
> > + "res_113",
> > + "res_114",
> > + "res_115",
> > + "res_116",
> > + "res_117",
> > + "res_118",
> > + "res_119",
> > + "res_120",
> > + "res_121",
> > + "res_122",
> > + "res_123",
> > + "res_124",
> > + "res_125",
> > + "res_126",
> > + "res_127",
> > + "res_128",
> > + "res_129",
> > + "res_130",
> > + "res_131",
> > + "res_132",
> > + "res_133",
> > + "res_134",
> > + "res_135",
> > + "res_136",
> > + "res_137",
> > + "res_138",
> > + "res_139",
> > + "res_140",
> > + "res_141",
> > + "res_142",
> > + "res_143",
> > + "res_144",
> > + "res_145",
> > + "res_146",
> > + "res_147",
> > + "res_148",
> > + "res_149",
> > + "res_150",
> > + "res_151",
> > + "res_152",
> > + "res_153",
> > + "res_154",
> > + "res_155",
> > + "res_156",
> > + "res_157",
> > + "res_158",
> > + "res_159",
> > + "res_160",
> > + "res_161",
> > + "res_162",
> > + "res_163",
> > + "res_164",
> > + "res_165",
> > + "res_166",
> > + "res_167",
> > + "res_168",
> > + "res_169",
> > + "res_170",
> > + "res_171",
> > + "res_172",
> > + "res_173",
> > + "res_174",
> > + "res_175",
> > + "res_176",
> > + "res_177",
> > + "res_178",
> > + "res_179",
> > + "res_180",
> > + "res_181",
> > + "res_182",
> > + "res_183",
> > + "res_184",
> > + "res_185",
> > + "res_186",
> > + "res_187",
> > + "res_188",
> > + "res_189",
> > + "res_190",
> > + "res_191",
> > + "res_192",
> > + "res_193",
> > + "res_194",
> > + "res_195",
> > + "res_196",
> > + "res_197",
> > + "res_198",
> > + "res_199",
> > + "res_200",
> > + "res_201",
> > + "res_202",
> > + "res_203",
> > + "res_204",
> > + "res_205",
> > + "res_206",
> > + "res_207",
> > + "res_208",
> > + "res_209",
> > + "res_210",
> > + "res_211",
> > + "res_212",
> > + "res_213",
> > + "res_214",
> > + "res_215",
> > + "res_216",
> > + "res_217",
> > + "res_218",
> > + "res_219",
> > + "res_220",
> > + "res_221",
> > + "res_222",
> > + "res_223",
> > + "res_224",
> > + "res_225",
> > + "res_226",
> > + "res_227",
> > + "res_228",
> > + "res_229",
> > + "res_230",
> > + "res_231",
> > + "res_232",
> > + "res_233",
> > + "res_234",
> > + "res_235",
> > + "res_236",
> > + "res_237",
> > + "res_238",
> > + "res_239",
> > + "res_240",
> > + "res_241",
> > + "res_242",
> > + "res_243",
> > + "res_244",
> > + "res_245",
> > + "res_246",
> > + "res_247",
> > + "res_248",
> > + "res_249",
> > + "res_250",
> > + "res_251",
> > + "res_252",
> > + "res_253",
> > + "res_254",
> > + "oem_unit",
> > +};
> > +
> > static struct inode *stlmfs_get_inode(struct super_block *sb)
> > {
> > struct inode *inode = new_inode(sb);
> > @@ -815,6 +1337,18 @@ DEFINE_TLM_CLASS(persistent_tlmo, "persistent", 0,
> > DEFINE_TLM_CLASS(value_tlmo, "value", 0,
> > S_IFREG | S_IRUSR, &de_read_fops, NULL);
> >
> > +static inline struct dentry *
> > +stlmfs_lookup_by_name(struct dentry *parent, const char *dname)
> > +{
> > + struct qstr qstr;
> > +
> > + qstr.name = dname;
> > + qstr.len = strlen(dname);
> > + qstr.hash = full_name_hash(parent, qstr.name, qstr.len);
> > +
> > + return d_lookup(parent, &qstr);
> > +}
> > +
> > static int scmi_telemetry_de_populate(struct super_block *sb,
> > struct scmi_tlm_setup *tsp,
> > struct dentry *parent,
> > @@ -1659,6 +2193,150 @@ static struct dentry *stlmfs_create_root_dentry(struct super_block *sb)
> > return dentry;
> > }
> >
> > +static int scmi_telemetry_de_subdir_symlink(struct super_block *sb,
> > + struct scmi_tlm_setup *tsp,
> > + const struct scmi_telemetry_de *de,
> > + struct dentry *parent)
> > +{
> > + struct dentry *dentry;
> > + struct inode *inode;
> > + int ret;
> I notice that ret isn't assigned a value and the function returns ret without
> initialising.
>
Yep, my bad: I think it is just a leftover from some last minute cleanup
I have done...it seems to cause only harmless (but noisy) error
messages...thanks for testing...I will fix !
> > +
> > + if (IS_ERR(parent))
> >
[snip]
>
> I will continue reviewing,
Yes please, thanks for having a look.
Thanks,
Cristian
next prev parent reply other threads:[~2026-01-19 15:42 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
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 [this message]
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=aW5Qy22usmoxVfBE@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.