From: Sudeep Holla <sudeep.holla@arm.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
"open list:COMMON CLK FRAMEWORK" <linux-clk@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:CPU FREQUENCY SCALING FRAMEWORK"
<linux-pm@vger.kernel.org>,
"open list:HARDWARE MONITORING" <linux-hwmon@vger.kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH RFC] firmware: arm_scmi: Allow for better protocol extensibility
Date: Fri, 24 May 2019 15:19:19 +0100 [thread overview]
Message-ID: <20190524141918.GA4408@e107155-lin> (raw)
In-Reply-To: <f9403e7e-1b87-dc46-dfc5-62227c659e7c@gmail.com>
On Thu, May 23, 2019 at 10:17:50AM -0700, Florian Fainelli wrote:
> On 5/21/19 1:01 PM, Florian Fainelli wrote:
> > The SCMI specific allows implementors to define their custom protocols
> > in the 0x80-0xFF space. The current scmi_handle structure requires us to
> > extend the structure with a set of operations and associated private
> > data in a way that is not quite scaling well.
> >
> > Create a 255 bytes structure that contains an opaque pointer to a set of
> > operations and private data and create two helper functions to retrieve
> > those based on the protocol identifier. Several options were considered,
> > like using a linked list but since we could be performance sensitive in
> > some paths, using an array was faster and simpler.
> >
> > Convert all call sites to use either scmi_protocol_get_ops() or
> > scmi_protocol_get_info().
> >
> > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>
> On second thought, what I really need is private storage to the scmi_dev
> (the consumer side), and not so much the protocol (provider) side.
> Therefore using dev_{set,get}_drvadata() against scmi_device::dev should
> be working just fine, and if we are concerned about another part of the
> SCMI stack making use of that storage, we can always extend struct
> scmi_device with a private cookie.
Sorry, I haven't looked into the original patch in detail yet. But I
always have rejected to add support for just infrastructure to add
vendor specific protocols both internally @ARM and to some private
emails I have received. I prefer to merge it with the first reference
vendor specific protocol so that the users of this infrastructure gets
a fair idea on how to use the same.
I will look at the RFC next week.
--
Regards,
Sudeep
prev parent reply other threads:[~2019-05-24 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 20:01 [PATCH RFC] firmware: arm_scmi: Allow for better protocol extensibility Florian Fainelli
2019-05-23 17:17 ` Florian Fainelli
2019-05-24 14:19 ` Sudeep Holla [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=20190524141918.GA4408@e107155-lin \
--to=sudeep.holla@arm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=jdelvare@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mturquette@baylibre.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=viresh.kumar@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;
as well as URLs for NNTP newsgroup(s).