From: Cristian Marussi <cristian.marussi@arm.com>
To: Sibi Sankar <quic_sibis@quicinc.com>
Cc: Johan Hovold <johan@kernel.org>,
sudeep.holla@arm.com, cristian.marussi@arm.com,
ulf.hansson@linaro.org, jassisinghbrar@gmail.com,
dmitry.baryshkov@linaro.org, linux-kernel@vger.kernel.org,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, konradybcio@kernel.org,
linux-pm@vger.kernel.org, tstrudel@google.com, rafael@kernel.org,
Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH V5 3/6] firmware: arm_scmi: Report duplicate opps as firmware bugs
Date: Mon, 4 Nov 2024 14:07:56 +0000 [thread overview]
Message-ID: <ZyjVMBtm0eLoDlYK@pluto> (raw)
In-Reply-To: <e173058b-57e7-7fd0-dab7-7398bf9d66ec@quicinc.com>
On Mon, Nov 04, 2024 at 07:20:01PM +0530, Sibi Sankar wrote:
>
>
> On 11/1/24 19:39, Johan Hovold wrote:
> > On Wed, Oct 30, 2024 at 06:25:09PM +0530, Sibi Sankar wrote:
> > > Duplicate opps reported by buggy SCP firmware currently show up
> > > as warnings even though the only functional impact is that the
> > > level/index remain inaccessible. Make it less scary for the end
> > > user by using dev_info instead, along with FW_BUG tag.
> > >
> > > Suggested-by: Johan Hovold <johan+linaro@kernel.org>
> > > Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
> > > ---
> > > drivers/firmware/arm_scmi/perf.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
> > > index 32f9a9acd3e9..c7e5a34b254b 100644
> > > --- a/drivers/firmware/arm_scmi/perf.c
> > > +++ b/drivers/firmware/arm_scmi/perf.c
> > > @@ -387,7 +387,7 @@ process_response_opp(struct device *dev, struct perf_dom_info *dom,
> > > ret = xa_insert(&dom->opps_by_lvl, opp->perf, opp, GFP_KERNEL);
> > > if (ret) {
> > > - dev_warn(dev, "Failed to add opps_by_lvl at %d for %s - ret:%d\n",
> > > + dev_info(dev, FW_BUG "Failed to add opps_by_lvl at %d for %s - ret:%d\n",
> > > opp->perf, dom->info.name, ret);
> >
> > I was hoping you could make the error message a bit more informative as
> > well, for example, by saying that a duplicate opp level was ignored:
> >
> > arm-scmi arm-scmi.0.auto: [Firmware Bug]: Ignoring duplicate OPP 3417600 for NCC
>
> I did think about doing something similar but xa_insert can fail
> with both -EXIST (duplicate) and -ENOMEM, so the we can't really
> use term duplicate when insert fails. I can add the perf level
> though to the message though.
>
It is the caller iter_perf_levels_process_response() of the above
helpers that is in charge to check the retval and decide what to do:
if it is a -EBUSY it just bails out returning 0 (SKIP) otherwise returns
the error... (and anyway the warn/info had already been given)
Originally the message was generic exactly for this reason...making some
noise to have fw/guys fix it and carry on...or fail completely the otehr
way...
I suppose you should move the error message in the caller if you want
to attain this level of information for the user...if not you are also
making noise potentially for nothing by saying FW_BUG on an -ENOMEM...
....anyway, on the otehr side, on the -ENOMEM path there is probably
really no need to say anything in any case...things are going terribly
wrong and you will notice soon in the form of a total failure of the stack,
most probably.
Thanks,
Cristian
next prev parent reply other threads:[~2024-11-04 14:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 12:55 [PATCH V5 0/6] firmware: arm_scmi: Misc Fixes Sibi Sankar
2024-10-30 12:55 ` [PATCH V5 1/6] firmware: arm_scmi: Ensure that the message-id supports fastchannel Sibi Sankar
2024-10-30 12:55 ` [PATCH V5 2/6] firmware: arm_scmi: Skip opp duplicates Sibi Sankar
2024-10-30 12:55 ` [PATCH V5 3/6] firmware: arm_scmi: Report duplicate opps as firmware bugs Sibi Sankar
2024-10-30 14:39 ` Cristian Marussi
2024-10-30 16:42 ` Florian Fainelli
2024-11-01 14:09 ` Johan Hovold
2024-11-04 13:50 ` Sibi Sankar
2024-11-04 14:07 ` Cristian Marussi [this message]
2024-11-04 14:09 ` Johan Hovold
2024-11-06 7:20 ` Sudeep Holla
2024-11-06 7:07 ` Sudeep Holla
2024-10-30 12:55 ` [PATCH V5 4/6] pmdomain: core: Add GENPD_FLAG_DEV_NAME_FW flag Sibi Sankar
2024-10-30 12:55 ` [PATCH V5 5/6] pmdomain: arm: Use FLAG_DEV_NAME_FW to ensure unique names Sibi Sankar
2024-10-30 12:55 ` [PATCH V5 6/6] mailbox: qcom-cpucp: Mark the irq with IRQF_NO_SUSPEND flag Sibi Sankar
2024-10-30 16:19 ` [PATCH V5 0/6] firmware: arm_scmi: Misc Fixes Ulf Hansson
2024-10-30 16:28 ` Cristian Marussi
2024-11-06 7:12 ` Sudeep Holla
2024-11-12 15:56 ` Ulf Hansson
2024-11-12 17:19 ` Johan Hovold
2024-11-12 18:48 ` Ulf Hansson
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=ZyjVMBtm0eLoDlYK@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=jassisinghbrar@gmail.com \
--cc=johan+linaro@kernel.org \
--cc=johan@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=quic_sibis@quicinc.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=tstrudel@google.com \
--cc=ulf.hansson@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