linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] Introduce SCMI transport atomic support
@ 2021-06-06 22:12 Cristian Marussi
  2021-06-06 22:12 ` [RFC PATCH 01/10] firmware: arm_scmi: Reset properly xfer SCMI status Cristian Marussi
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Cristian Marussi @ 2021-06-06 22:12 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: sudeep.holla, james.quinlan, Jonathan.Cameron, f.fainelli,
	etienne.carriere, vincent.guittot, souvik.chakravarty,
	cristian.marussi

Hi all,

This RFC series mainly aims to introduce atomic support for transport that
can support it.

At first in [03/10], as a closely related addition, it is introduced a
common way  for a transport to signal to the SCMI core that it does not
offer completion interrupts, so that the usual polling behaviour based
on .poll_done() will be required: this can be done enabling statically
a global polling behaviour for the whole transport with flag
scmi_desc.force_polling OR dynamically enabling at runtime such polling
behaviour on a per-channel basis with scmi_chan_info.needs_polling,
typically during .chan_setup(). The usual per-command polling selection
behaviour based on hdr.poll_completion is preserved as before.

then in [04/10], a transport that supports atomic operation on its tx path
can now declare itself as .atomic_capable and as a consequence the SCMI
core will refrain itself from sleeping on the correspondent rx-path.

In [07/10] a simple method is introduced so that an SCMI driver can easily
query the core to check if the currently used transport is configured to
behave in an atomic manner: in this way, interested SCMI driver users, like
Clock framework [08/10], can optionally support atomic operations when
operating on an atomically configured transport.

Finally there are 2 *tentative" patch for SMC transport: at first [09/10]
ports SMC to use the common core completions when completion interrupt is
available or otherwise revert to use common core polling mechanism above
introduced; then in [10/10] SMC is converted to be .atomic_capable by
substituting the mutexes with busy-waiting to keep the channel 'locked'.

SMC changes have not been tested so far (I cannot), AND they are just a
proposal at this stage to try to better abstract and unify behaviour with
the SCMI core; both patches are completely intended as RFCs, though, not
only regarding their implementation but even their mere existence is RFC:
I mean maybe we just don't want to do such kind of unification/abstraction,
and I can just drop those SMC patches if unwanted; any feedback welcome.

Atomic support has been minimally tested against the upcoming virtio
transport draft(unposted) series, while polling has been tested both
with virtio and mailbox transports.

The series is based on sudeep/for-next [1] on top of commit:

commit 0aa69c9fc80d ("firmware: arm_scmi: Add compatibility checks for
		     shmem node")

Given the RFC status of the series in general I still not have CCed any
maintainer out of SCMI subsystem.

Any feedback welcome.

Thanks,

Cristian

---

[1]:https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi

Cristian Marussi (10):
  firmware: arm_scmi: Reset properly xfer SCMI status
  firmware: arm_scmi: Add missing xfer reinit_completion
  firmware: arm_scmi: Add configurable polling mode for transports
  firmware: arm_scmi: Add support for atomic transports
  include: trace: Add new scmi_xfer_response_wait event
  firmware: arm_scmi: Use new trace event scmi_xfer_response_wait
  firmware: arm_scmi: Add is_transport_atomic() handle method
  clk: scmi: Support atomic enable/disable API
  firmware: arm-scmi: Make smc transport use common completions
  firmware: arm-scmi: Make smc transport atomic

 drivers/clk/clk-scmi.c             |  44 +++++--
 drivers/firmware/arm_scmi/common.h |  11 ++
 drivers/firmware/arm_scmi/driver.c | 184 +++++++++++++++++++++++++----
 drivers/firmware/arm_scmi/smc.c    |  60 ++++++----
 include/linux/scmi_protocol.h      |   8 ++
 include/trace/events/scmi.h        |  28 +++++
 6 files changed, 277 insertions(+), 58 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-06-09 20:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06 22:12 [RFC PATCH 00/10] Introduce SCMI transport atomic support Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 01/10] firmware: arm_scmi: Reset properly xfer SCMI status Cristian Marussi
2021-06-07 17:38   ` Sudeep Holla
2021-06-07 18:01     ` Cristian Marussi
2021-06-07 18:27       ` Sudeep Holla
2021-06-08 10:10         ` Cristian Marussi
2021-06-08 11:17           ` Sudeep Holla
2021-06-06 22:12 ` [RFC PATCH 02/10] firmware: arm_scmi: Add missing xfer reinit_completion Cristian Marussi
2021-06-07 17:42   ` Sudeep Holla
2021-06-07 18:04     ` Cristian Marussi
2021-06-07 18:30       ` Sudeep Holla
2021-06-09 20:51   ` Sudeep Holla
2021-06-06 22:12 ` [RFC PATCH 03/10] firmware: arm_scmi: Add configurable polling mode for transports Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 04/10] firmware: arm_scmi: Add support for atomic transports Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 05/10] include: trace: Add new scmi_xfer_response_wait event Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 06/10] firmware: arm_scmi: Use new trace event scmi_xfer_response_wait Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 07/10] firmware: arm_scmi: Add is_transport_atomic() handle method Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 08/10] clk: scmi: Support atomic enable/disable API Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 09/10] firmware: arm-scmi: Make smc transport use common completions Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 10/10] firmware: arm-scmi: Make smc transport atomic Cristian Marussi

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