From: Sumit Garg <sumit.garg@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org,
Marc Bonnici <marc.bonnici@arm.com>,
Achin Gupta <achin.gupta@arm.com>,
Jens Wiklander <jens.wiklander@linaro.org>,
Valentin Laurent <valentin.laurent@trustonic.com>,
Lukas Hanel <lukas.hanel@trustonic.com>,
Coboy Chen <coboy.chen@mediatek.com>
Subject: Re: [PATCH v2 07/10] firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
Date: Mon, 5 Sep 2022 12:50:51 +0530 [thread overview]
Message-ID: <CAFA6WYOxBm-TYC4sOqWE__oJeimjmZDNZZW_h3X5CV-8bXhtMg@mail.gmail.com> (raw)
In-Reply-To: <20220902124032.788488-8-sudeep.holla@arm.com>
On Fri, 2 Sept 2022 at 18:10, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> Except the message APIs, all other APIs are ffa_device independent and can
> be used without any associated ffa_device from a non ffa_driver.
>
> In order to reflect the same, just rename ffa_dev_ops as ffa_ops to
> avoid any confusion or to keep it simple.
>
> Suggested-by: Sumit Garg <sumit.garg@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
> drivers/firmware/arm_ffa/bus.c | 2 +-
> drivers/firmware/arm_ffa/driver.c | 2 +-
> drivers/tee/optee/ffa_abi.c | 14 +++++++-------
> include/linux/arm_ffa.h | 8 ++++----
> 4 files changed, 13 insertions(+), 13 deletions(-)
>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Sumit
> diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
> index 69328041fbc3..99d439480612 100644
> --- a/drivers/firmware/arm_ffa/bus.c
> +++ b/drivers/firmware/arm_ffa/bus.c
> @@ -168,7 +168,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev)
> }
>
> struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
> - const struct ffa_dev_ops *ops)
> + const struct ffa_ops *ops)
> {
> int ret;
> struct device *dev;
> diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
> index e4fd35773071..2532e0f16cc9 100644
> --- a/drivers/firmware/arm_ffa/driver.c
> +++ b/drivers/firmware/arm_ffa/driver.c
> @@ -666,7 +666,7 @@ static int ffa_memory_lend(struct ffa_mem_ops_args *args)
> return ffa_memory_ops(FFA_MEM_LEND, args);
> }
>
> -static const struct ffa_dev_ops ffa_ops = {
> +static const struct ffa_ops ffa_ops = {
> .api_version_get = ffa_api_version_get,
> .partition_info_get = ffa_partition_info_get,
> .mode_32bit_set = ffa_mode_32bit_set,
> diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
> index 7257b42d0545..2ce5b87dfb27 100644
> --- a/drivers/tee/optee/ffa_abi.c
> +++ b/drivers/tee/optee/ffa_abi.c
> @@ -272,7 +272,7 @@ static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
> {
> struct optee *optee = tee_get_drvdata(ctx->teedev);
> struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
> - const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
> + const struct ffa_ops *ffa_ops = ffa_dev->ops;
> struct ffa_mem_region_attributes mem_attr = {
> .receiver = ffa_dev->vm_id,
> .attrs = FFA_MEM_RW,
> @@ -315,7 +315,7 @@ static int optee_ffa_shm_unregister(struct tee_context *ctx,
> {
> struct optee *optee = tee_get_drvdata(ctx->teedev);
> struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
> - const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
> + const struct ffa_ops *ffa_ops = ffa_dev->ops;
> u64 global_handle = shm->sec_world_id;
> struct ffa_send_direct_data data = {
> .data0 = OPTEE_FFA_UNREGISTER_SHM,
> @@ -342,7 +342,7 @@ static int optee_ffa_shm_unregister_supp(struct tee_context *ctx,
> struct tee_shm *shm)
> {
> struct optee *optee = tee_get_drvdata(ctx->teedev);
> - const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_dev->ops;
> + const struct ffa_ops *ffa_ops = optee->ffa.ffa_dev->ops;
> u64 global_handle = shm->sec_world_id;
> int rc;
>
> @@ -530,7 +530,7 @@ static int optee_ffa_yielding_call(struct tee_context *ctx,
> {
> struct optee *optee = tee_get_drvdata(ctx->teedev);
> struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
> - const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
> + const struct ffa_ops *ffa_ops = ffa_dev->ops;
> struct optee_call_waiter w;
> u32 cmd = data->data0;
> u32 w4 = data->data1;
> @@ -652,7 +652,7 @@ static int optee_ffa_do_call_with_arg(struct tee_context *ctx,
> */
>
> static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
> - const struct ffa_dev_ops *ops)
> + const struct ffa_ops *ops)
> {
> struct ffa_send_direct_data data = { OPTEE_FFA_GET_API_VERSION };
> int rc;
> @@ -687,7 +687,7 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
> }
>
> static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev,
> - const struct ffa_dev_ops *ops,
> + const struct ffa_ops *ops,
> u32 *sec_caps,
> unsigned int *rpc_param_count)
> {
> @@ -783,7 +783,7 @@ static void optee_ffa_remove(struct ffa_device *ffa_dev)
>
> static int optee_ffa_probe(struct ffa_device *ffa_dev)
> {
> - const struct ffa_dev_ops *ffa_ops;
> + const struct ffa_ops *ffa_ops;
> unsigned int rpc_param_count;
> struct tee_shm_pool *pool;
> struct tee_device *teedev;
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index eafab07c9f58..4c4b06783035 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -17,7 +17,7 @@ struct ffa_device {
> bool mode_32bit;
> uuid_t uuid;
> struct device dev;
> - const struct ffa_dev_ops *ops;
> + const struct ffa_ops *ops;
> };
>
> #define to_ffa_dev(d) container_of(d, struct ffa_device, dev)
> @@ -49,7 +49,7 @@ static inline void *ffa_dev_get_drvdata(struct ffa_device *fdev)
>
> #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
> struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
> - const struct ffa_dev_ops *ops);
> + const struct ffa_ops *ops);
> void ffa_device_unregister(struct ffa_device *ffa_dev);
> int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
> const char *mod_name);
> @@ -59,7 +59,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
> #else
> static inline
> struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
> - const struct ffa_dev_ops *ops)
> + const struct ffa_ops *ops)
> {
> return NULL;
> }
> @@ -254,7 +254,7 @@ struct ffa_mem_ops_args {
> struct ffa_mem_region_attributes *attrs;
> };
>
> -struct ffa_dev_ops {
> +struct ffa_ops {
> u32 (*api_version_get)(void);
> int (*partition_info_get)(const char *uuid_str,
> struct ffa_partition_info *buffer);
> --
> 2.37.3
>
next prev parent reply other threads:[~2022-09-05 7:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 12:40 [PATCH v2 00/10] firmware: arm_ffa: Refactoring and initial/minor v1.1 update Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 01/10] firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 02/10] tee: optee: Drop ffa_ops in optee_ffa structure using ffa_dev->ops directly Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 03/10] firmware: arm_ffa: Remove ffa_dev_ops_get() Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 04/10] firmware: arm_ffa: Add support for querying FF-A features Sudeep Holla
2022-09-07 12:10 ` Jens Wiklander
2022-09-02 12:40 ` [PATCH v2 05/10] firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 06/10] firmware: arm_ffa: Make memory apis ffa_device independent Sudeep Holla
2022-09-07 8:27 ` Jens Wiklander
2022-09-02 12:40 ` [PATCH v2 07/10] firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops Sudeep Holla
2022-09-05 7:20 ` Sumit Garg [this message]
2022-09-07 8:29 ` Jens Wiklander
2022-09-02 12:40 ` [PATCH v2 08/10] firmware: arm_ffa: Add v1.1 get_partition_info support Sudeep Holla
2022-09-07 8:38 ` Jens Wiklander
2022-09-07 11:04 ` Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 09/10] firmware: arm_ffa: Set up 32bit execution mode flag using partiion property Sudeep Holla
2022-09-07 9:01 ` Jens Wiklander
2022-09-07 11:01 ` Sudeep Holla
2022-09-02 12:40 ` [PATCH v2 10/10] firmware: arm_ffa: Split up ffa_ops into info, message and memory operations Sudeep Holla
2022-09-06 10:34 ` [PATCH v2 00/10] firmware: arm_ffa: Refactoring and initial/minor v1.1 update 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=CAFA6WYOxBm-TYC4sOqWE__oJeimjmZDNZZW_h3X5CV-8bXhtMg@mail.gmail.com \
--to=sumit.garg@linaro.org \
--cc=achin.gupta@arm.com \
--cc=coboy.chen@mediatek.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.hanel@trustonic.com \
--cc=marc.bonnici@arm.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=sudeep.holla@arm.com \
--cc=valentin.laurent@trustonic.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).