From: Cristian Marussi <cristian.marussi@arm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Johan Hovold <johan@kernel.org>,
Sibi Sankar <quic_sibis@quicinc.com>,
sudeep.holla@arm.com, cristian.marussi@arm.com,
dmitry.baryshkov@linaro.org, maz@kernel.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
Subject: Re: [RFC V6 2/2] firmware: arm_scmi: Add quirk to bypass SCP fw bug
Date: Thu, 27 Feb 2025 08:03:08 +0000 [thread overview]
Message-ID: <Z8Ab_wrO8JgSD_D0@pluto> (raw)
In-Reply-To: <759226e1-05aa-4ca2-b2f5-7f1a84dc427f@stanley.mountain>
On Wed, Feb 26, 2025 at 12:31:27PM +0300, Dan Carpenter wrote:
> On Wed, Feb 26, 2025 at 09:55:21AM +0100, Johan Hovold wrote:
> > On Wed, Feb 26, 2025 at 09:12:23AM +0100, Johan Hovold wrote:
> > > On Wed, Feb 26, 2025 at 08:13:38AM +0530, Sibi Sankar wrote:
> >
> > > > scmi_common_fastchannel_init(const struct scmi_protocol_handle *ph,
> > > > u8 describe_id, u32 message_id, u32 valid_size,
> > > > u32 domain, void __iomem **p_addr,
> > > > - struct scmi_fc_db_info **p_db, u32 *rate_limit)
> > > > + struct scmi_fc_db_info **p_db, u32 *rate_limit,
> > > > + bool skip_check)
> > >
> > > This does not look like it will scale.
> >
> > After taking a closer look, perhaps it needs to be done along these
> > lines.
> >
> > But calling the parameter 'force' or similar as Dan suggested should
> > make it more readable.
> >
> > >
> > > > {
> > > > int ret;
> > > > u32 flags;
> > > > @@ -1919,7 +1920,7 @@ scmi_common_fastchannel_init(const struct scmi_protocol_handle *ph,
> > > >
> > > > /* Check if the MSG_ID supports fastchannel */
> > > > ret = scmi_protocol_msg_check(ph, message_id, &attributes);
> > > > - if (!ret && !MSG_SUPPORTS_FASTCHANNEL(attributes))
> > > > + if (!ret && !MSG_SUPPORTS_FASTCHANNEL(attributes) && !skip_check)
> > >
> > > Why can't you just make sure that the bit is set in attributes as I
> > > suggested? That seems like it should allow for a minimal implementation
> > > of this.
> >
> > My idea here was that you could come up with some way of abstracting
> > this so that you did not have to update every call site. Not sure how
> > feasible that is.
> >
>
> I'm having a hard time finding your email.
>
> Why does the scmi_proto_helpers_ops struct even exist? We could just
> call all these functions directly. Do we have plans to actually create
> different implementations?
>
> If we got rid of the scmi_proto_helpers_ops struct then we could just
> rename scmi_common_fastchannel_init() to __scmi_common_fastchannel_init()
> and create a default wrapper around it and a _forced() wrapper.
These are common helpers for all the protocols to avoid endlessly
repeating the same code pattern (like fc_init or iterators) and they are
laid out this way to be usable by any protocol even if you compile it as
a module WITHOUT the need of EXPORTing any of these symbols....same
reason why all protocol ops exposed in scmi_protocol.h are defined to be
accessed using an instance handle....trying to limit as much as possible
EXPORTing symbols beside the basic needs...specially because SCMI
specifes a protocol that is extensible by design both for standard and
vendor protocols, so it would soon became a hell to maintain such an
API..I mean just look at scmi_protocol.h...these helpers are made
accessible this way for the same reasons...same for the xops
(beside also not being overlying appreciated in the Android world to
ass an excessive number of EXPORTed syms)
Thanks,
Cristian
prev parent reply other threads:[~2025-02-27 8:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 2:43 [RFC V6 0/2] firmware: arm_scmi: Misc Fixes Sibi Sankar
2025-02-26 2:43 ` [RFC V6 1/2] firmware: arm_scmi: Ensure that the message-id supports fastchannel Sibi Sankar
2025-02-26 2:43 ` [RFC V6 2/2] firmware: arm_scmi: Add quirk to bypass SCP fw bug Sibi Sankar
2025-02-26 8:10 ` Dan Carpenter
2025-02-26 8:12 ` Johan Hovold
2025-02-26 8:55 ` Johan Hovold
2025-02-26 9:31 ` Dan Carpenter
2025-02-26 9:58 ` Johan Hovold
2025-02-27 8:34 ` Cristian Marussi
2025-03-03 10:53 ` Johan Hovold
2025-03-18 8:16 ` Johan Hovold
2025-03-18 13:29 ` Cristian Marussi
2025-03-18 15:40 ` Johan Hovold
2025-02-27 8:03 ` Cristian Marussi [this message]
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=Z8Ab_wrO8JgSD_D0@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=dmitry.baryshkov@linaro.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=maz@kernel.org \
--cc=quic_sibis@quicinc.com \
--cc=sudeep.holla@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).