Devicetree
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Trilok Soni <tsoni@codeaurora.org>,
	Trilok Soni <tsoni@quicinc.com>,
	arve@android.com, Andrew Walbran <qwandor@google.com>,
	David Hartley <dhh@qti.qualcomm.com>,
	Achin Gupta <Achin.Gupta@arm.com>,
	Android Kernel Team <kernel-team@android.com>,
	Fuad Tabba <tabba@google.com>
Subject: Re: [PATCH v2 7/9] firmware: arm_ffa: Setup in-kernel users of FFA partitions
Date: Mon, 30 Nov 2020 11:13:27 +0000	[thread overview]
Message-ID: <20201130111327.xnw7gzqgygpjiays@bogus> (raw)
In-Reply-To: <20201128133655.GB8649@jade>

On Sat, Nov 28, 2020 at 02:36:55PM +0100, Jens Wiklander wrote:
> Hi Sudeep,
>

[...]

> > @@ -113,12 +117,19 @@ struct ffa_driver {
> >
> >  #define to_ffa_driver(d) container_of(d, struct ffa_driver, driver)
> >
> > +struct ffa_dev_ops {
> > +	int (*open)(struct ffa_device *dev);
> > +	int (*close)(struct ffa_device *dev);
> > +	long (*ioctl)(struct ffa_device *dev, unsigned int ioctl, void *arg);
> > +};
>
> I assume that all interaction with a SP is done via ffa_ops->ioctl().

Yes that was the idea.

> For example the ffa_msg_send_direct_req() function is then called via:
> struct ffa_send_recv_sync arg = { .endpoint_id = xxx, .data = yyy };
> rc = ffa_ops->ioctl(ffa_dev, FFA_SEND_RECEIVE_SYNC, &arg);
>

Correct.

> That isn't too hard to use, but is a bit inconvenient and less safe
> compared to a plain:
> rc = ffa_ops->send_recieve_sync(ffa_dev, xxx, yyy);
>

Agreed.

> I don't see any big win in then next patch with ffa_ioctl() either. That
> function must still do some actions specific for each ioctl id. So I'm a
> bit curious about the design choice.
>

Initial idea was to keep both in-kernel and user-space interface inline.
Also the assumption was that expect few old/legacy usecases, the userspace
is the way forward. While that is still ideal, but things have changed
since the main user of userspace interface(pKVM) is no longer using
FFA. I will change the interface as you mention above. I was also more
inclined towards that after dropping userspace. Good timing though, I was
about to post revised version dropping userspace. I will modify the
interface something on lines of your suggestion.

--
Regards,
Sudeep

  reply	other threads:[~2020-11-30 11:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 17:43 [PATCH v2 0/9] firmware: Add initial support for Arm FF-A Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 1/9] dt-bindings: Arm: Add Firmware Framework for Armv8-A (FF-A) binding Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 2/9] dt-bindings: Arm: Extend FF-A binding to support in-kernel usage of partitions Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 3/9] arm64: smccc: Add support for SMCCCv1.2 input/output registers Sudeep Holla
2020-11-04 13:22   ` Andrew Walbran
2020-11-03 17:43 ` [PATCH v2 4/9] firmware: arm_ffa: Add initial FFA bus support for device enumeration Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 5/9] firmware: arm_ffa: Add initial Arm FFA driver support Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 6/9] firmware: arm_ffa: Add support for SMCCC as transport to FFA driver Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 7/9] firmware: arm_ffa: Setup in-kernel users of FFA partitions Sudeep Holla
2020-11-28 13:36   ` Jens Wiklander
2020-11-30 11:13     ` Sudeep Holla [this message]
2020-11-03 17:43 ` [PATCH v2 8/9] firmware: arm_ffa: Setup and register all the KVM managed partitions Sudeep Holla
2020-11-03 17:43 ` [PATCH v2 9/9] firmware: arm_ffa: Add support for MEM_* interfaces Sudeep Holla
2020-11-04  5:48   ` kernel test robot
2020-11-28 12:25 ` [PATCH v2 0/9] firmware: Add initial support for Arm FF-A Jens Wiklander
2020-11-30 11:17   ` 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:
  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=20201130111327.xnw7gzqgygpjiays@bogus \
    --to=sudeep.holla@arm.com \
    --cc=Achin.Gupta@arm.com \
    --cc=arve@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dhh@qti.qualcomm.com \
    --cc=jens.wiklander@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=qwandor@google.com \
    --cc=tabba@google.com \
    --cc=tsoni@codeaurora.org \
    --cc=tsoni@quicinc.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