Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Usama Arif <usama.arif@linux.dev>
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, 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, dan.carpenter@linaro.org, d-gole@ti.com,
	jonathan.cameron@huawei.com, elif.topuz@arm.com,
	lukasz.luba@arm.com, philip.radford@arm.com, brauner@kernel.org,
	souvik.chakravarty@arm.com
Subject: Re: [PATCH v3 01/24] firmware: arm_scmi: Add new SCMIv4.0 error codes definitions
Date: Mon, 15 Jun 2026 08:44:49 +0100	[thread overview]
Message-ID: <ai-tXclzfL9CkGkq@pluto> (raw)
In-Reply-To: <20260612101100.186627-1-usama.arif@linux.dev>

On Fri, Jun 12, 2026 at 03:10:59AM -0700, Usama Arif wrote:
> On Sun, 29 Mar 2026 17:33:12 +0100 Cristian Marussi <cristian.marussi@arm.com> wrote:
> 

Hi Usama,

Thanks for having a look at this first of all !

I was busy posting a V4 before merge window last week so this late
reply....

I am already planning a V5 in -rc1 in two weeks where beside some more
minor ABI additions I will plan to address any incoming reviews and
some residual minor issues I know about (mostly sparse related)

...but you are CCed already in V4...

> > SCMIv4.0 introduces a couple of new possible protocol error codes: add
> > the needed definitions and mappings to Linux error values.
> > 
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> >  drivers/firmware/arm_scmi/common.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
> > index 7c35c95fddba..44af2018e21d 100644
> > --- a/drivers/firmware/arm_scmi/common.h
> > +++ b/drivers/firmware/arm_scmi/common.h
> > @@ -45,6 +45,8 @@ enum scmi_error_codes {
> >  	SCMI_ERR_GENERIC = -8,	/* Generic Error */
> >  	SCMI_ERR_HARDWARE = -9,	/* Hardware Error */
> >  	SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
> > +	SCMI_ERR_IN_USE = -11,  /* In Use Error */
> > +	SCMI_ERR_PARTIAL = -12, /* Partial Error */
> >  };
> >  
> >  static const int scmi_linux_errmap[] = {
> > @@ -60,6 +62,8 @@ static const int scmi_linux_errmap[] = {
> >  	-EIO,			/* SCMI_ERR_GENERIC */
> >  	-EREMOTEIO,		/* SCMI_ERR_HARDWARE */
> >  	-EPROTO,		/* SCMI_ERR_PROTOCOL */
> > +	-EPERM,			/* SCMI_ERR_IN_USE */
> 
> "In use" reads like a resource-state failure, where -EBUSY would normally be expected.
> -EPERM suggests an authorization failure,  which is already represented by SCMI_ERR_ACCESS.
> 

The usage of this in Telemetry is indeed a resource state failure that relates to groups usage
and it means something like "this is busy now, so you cannot do that now with this current config"
...but you are definitely right that -EPERM does NOT fit well here and especially is NOT what IN_USE
should signify in general in SCMI as a return code for future users.

I will fix in V5.

Thanks,
Cristian


  parent reply	other threads:[~2026-06-15  7:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 16:33 [PATCH v3 00/24] Introduce SCMI Telemetry FS support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 01/24] firmware: arm_scmi: Add new SCMIv4.0 error codes definitions Cristian Marussi
     [not found]   ` <20260612101100.186627-1-usama.arif@linux.dev>
2026-06-15  7:44     ` Cristian Marussi [this message]
2026-03-29 16:33 ` [PATCH v3 02/24] firmware: arm_scmi: Reduce the scope of protocols mutex Cristian Marussi
     [not found]   ` <20260612101525.340337-1-usama.arif@linux.dev>
2026-06-15  7:48     ` Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 03/24] firmware: arm_scmi: Allow registration of unknown-size events/reports Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 04/24] firmware: arm_scmi: Allow protocols to register for notifications Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 05/24] uapi: Add ARM SCMI definitions Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 06/24] dt-bindings: firmware: arm,scmi: Add support for telemetry protocol Cristian Marussi
2026-03-29 17:31   ` Rob Herring (Arm)
2026-03-29 18:00     ` Cristian Marussi
2026-03-30  7:15       ` Krzysztof Kozlowski
2026-03-30  7:11   ` Krzysztof Kozlowski
2026-03-29 16:33 ` [PATCH v3 07/24] include: trace: Add Telemetry trace events Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 08/24] firmware: arm_scmi: Add basic Telemetry support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 09/24] firmware: arm_scmi: Add support to parse SHMTIs areas Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 10/24] firmware: arm_scmi: Add Telemetry configuration operations Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 11/24] firmware: arm_scmi: Add Telemetry DataEvent read capabilities Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 12/24] firmware: arm_scmi: Add support for Telemetry reset Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 13/24] firmware: arm_scmi: Add Telemetry notification support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 14/24] firmware: arm_scmi: Add support for boot-on Telemetry Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 15/24] firmware: arm_scmi: Add System Telemetry filesystem driver Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 16/24] fs/stlmfs: Document ARM SCMI Telemetry filesystem Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 17/24] firmware: arm_scmi: Add System Telemetry ioctls support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 18/24] fs/stlmfs: Document alternative ioctl based binary interface Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 19/24] firmware: arm_scmi: Add Telemetry components view Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 20/24] fs/stlmfs: Document alternative topological view Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 21/24] [RFC] docs: stlmfs: Document ARM SCMI Telemetry FS ABI Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 22/24] firmware: arm_scmi: Add lazy population support to Telemetry FS Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 23/24] fs/stlmfs: Document lazy mode and related mount option Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 24/24] [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=ai-tXclzfL9CkGkq@pluto \
    --to=cristian.marussi@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=brauner@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-doc@vger.kernel.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@kernel.org \
    --cc=usama.arif@linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox