LKML Archive on
help / color / mirror / Atom feed
From: Florian Fainelli <>
	Sudeep Holla <>,
	Michael Turquette <>,
	Stephen Boyd <>,
	"Rafael J. Wysocki" <>,
	Viresh Kumar <>,
	Jean Delvare <>,
	Guenter Roeck <>,
	"open list:COMMON CLK FRAMEWORK" <>,
	open list <>,
Subject: Re: [PATCH RFC] firmware: arm_scmi: Allow for better protocol extensibility
Date: Thu, 23 May 2019 10:17:50 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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 <>

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.

  reply	other threads:[~2019-05-23 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 20:01 Florian Fainelli
2019-05-23 17:17 ` Florian Fainelli [this message]
2019-05-24 14:19   ` Sudeep Holla

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH RFC] firmware: arm_scmi: Allow for better protocol extensibility' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).