From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A189EC44501 for ; Thu, 16 Jul 2026 09:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cFhc3A2Gj3VLhoCuEB6Vfl4jXl6a5OTrf/QYp31N2CU=; b=uNgy0BgNt7mF965NJ59gzBUuUM nKOl6s5o9VUPQXPOpKZj+iAnz3hWQKCYO8cSTJUmoccOD3ONPDWqeJPxBsIdtl4dC7DlhFmaX5Q4s P8PSfmjgKdJHqLXJO55tS9F/5F6eR8/1ZMPzqbpzLQrapRT/EZjba8REuIUGhRinGsnQwFxk3yGKw 1o9ie8S9PDa9Al26uL3+B1OvqK38KuWTGo22YLvsGOupPNmxjyIQyeYpmG/wfQeJ/dmU1KyWZC32E 26N0+Wtp3ySkoyMlZrjB9EDkozm5X754IpsRtRg9QvMyyhPrnu0ktynI7spCMWqbOm4B9SWQYaSJ6 yhauEY1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkI2p-0000000Gonw-1E3i; Thu, 16 Jul 2026 09:06:15 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkI2o-0000000Gono-0gOd for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2026 09:06:14 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 7DFB360054; Thu, 16 Jul 2026 09:06:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2825A1F000E9; Thu, 16 Jul 2026 09:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784192773; bh=cFhc3A2Gj3VLhoCuEB6Vfl4jXl6a5OTrf/QYp31N2CU=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=hknLmDoBW7ss9oL9YXcTCa2ZVl5Qn1Sv0jr3LP05pkNUX7XAOWheD0SyJrBdPxpPl 0u4o8X0y8lZwD2OakLJeUhHClG+rbUQjMc2V7pYUP4m+u5IbKk4AZCB/PzgAmKFCmY poNYp/l2QImOFWL0Ne8SQTvf2AByHJ3133i7V37duv1bkX4vI7qwu3XbJNsXxjFNIq NQ5YEHEWDXhbJmRdQ6YimHU0Fu6kSq5KXyEvesntxjPtt04oUlreNEeFtAvYFhcQoV b8QsDw/BwJOUxXsRYSNHKSbSic25UqDo4n7qFxBIR4vb461zsdNhEKrA0fT32YZeyG oX2i0JBvcAp9g== Message-ID: <01c47287-0168-4416-8116-dc25a48fb05c@kernel.org> Date: Thu, 16 Jul 2026 11:06:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 00/23] Introduce SCMI Telemetry support To: Cristian Marussi , Subrahmanya Lingappa Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, sudeep.holla@kernel.org, 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, d-gole@ti.com, jic23@kernel.org, elif.topuz@arm.com, lukasz.luba@arm.com, philip.radford@arm.com, brauner@kernel.org, souvik.chakravarty@arm.com, leitao@kernel.org, kas@kernel.org, puranjay@kernel.org, usama.arif@linux.dev, kernel-team@meta.com References: <20260703123601.381275-1-cristian.marussi@arm.com> <20260707063137.3222972-1-subrahmanya.lingappa@oss.qualcomm.com> From: "David Hildenbrand (Arm)" Content-Language: en-US Autocrypt: addr=david@kernel.org; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzS5EYXZpZCBIaWxk ZW5icmFuZCAoQ3VycmVudCkgPGRhdmlkQGtlcm5lbC5vcmc+wsGQBBMBCAA6AhsDBQkmWAik Ag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7V9A8isUCoqE2Dzh3FvYHVeX4Us+bRL/oqareJ CIFqgYMyvHj7Q06kTKmauOe4Nf0l0qEkIuIzfoLJ3qr5UyXc2hLtWyT9Ir+lYlX9efqh7mOY qIws/H2t In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, thanks for looking into this again, Subrahmanya, Let me add some additional points to Cristian's reply. > >> >> I agree that asking this series to grow a generic telemetry subsystem now is >> too much. With only SCMI in-tree, it would be easy to create a "generic" >> interface that is really just SCMI with different names. I also agree that raw >> SHMTI is not just a debug path if the expected users are high-rate tooling. >> >> So let me narrow the ask. >> >> I am not asking for `drivers/telemetry/` in v6. I am asking that the SCMI >> chardev/UAPI not be tied too closely to the current SCMI core storage layout. >> In particular, I think v6 should try to: >> >> - copy descriptor/config/sample data through fixed and extensible UAPI >> structs, not structs mirroring SCMI internal objects; > > If you mean by this adding a bit more of pad/reserved space scattered > here and there, it is not a problem; also, one thing that is still missing > and planned to be added is some ABI Versioning and related IOCTL, > should not this be enough to address future possible UAPI expansions ? > > Regarding avoiding mapping internal SCMI object in the UAPI, I think I > am already NOT blindly sharing internal structures but instead I copy > explicitly internal representations into the UAPI fields....I think the > only exception to this is the sample (scmi_tlm_de_sample) that I take > care to keep aligned with the internals to avoid the overhead of the > double copy...but it seems one of the few pretty much general concept > that I felt confident to abstract no ? > > ...but of course this UAPI abstraction into which I copy the results > is mapped into SCMI inspired concepts/abstractions...for the reasons > we said.... Getting the UAPI right and future-proof is certainly the most critical thing. Adding some more padding to keep it extensible is certainly doable. I remember plans for having an ABI versioning though, would that still be required (or could it even be deferred) if we add some more padding to the structs? Or would ABI versioning just avoid that for now? > >> - treat DE IDs, group IDs and SHMTI IDs as protocol identifiers, not as >> implicit indexes into kernel arrays; > > Not sure what you mean here... a shim layer used to acces info data > indirectly instead of the SCMI data structures ? > > or some sort of layer/abstraction to be able to remap references > internally ? again it is not easy to imagine an abstraction without any > other example than SCMI...or you mean naming issue in the UAPI ? I'm also having a hard time understanding this. Subrahmanya, can you share an example of before vs. after to clarify? Thanks > >> - keep the TDCF/SHMTI parsing and SCMI command handling behind small >> internal ops used by the chardev side; > > well..if you refer to the telemetry_ops, this is an SCMI driver so it > has the structure of an SCMI driver, the Telemetry Operations exposed by > the core SCMI stack are the internal ops themselves that you ask for in > my opinion...I mean this is pretty much internal stuff that has nothing > to do with the UAPI itself and I imagine that when some future protocol > of yours, like the XXMI you mentioned, will appear you will write a new > driver on your own subsystem that will implement the UAPI itself for > your protocols (if you want to share that)...any possible future internal > reworking due to possible common abstractions on our side can be carried > out in the future... Any internal refactorings should be had once required, not prematurely. At this point it's not even clear when/how/if any internal user would want to reuse some pieces. > >> - document the config model explicitly: per SCMI instance, last writer wins, >> generation changes tell userspace that state changed; >> - document the mmap contract: length, offsets, cache attributes, lifetime, >> and reset/reconfiguration behaviour. > > Completely agreed on this...Documentation is still lacking, including > extensive examples...I should have marked docs as RFC too... +1 -- Cheers, David