]> git.itanic.dy.fi Git - linux-stable/commitdiff
firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 7 Sep 2022 14:52:37 +0000 (15:52 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Thu, 8 Sep 2022 10:30:34 +0000 (11:30 +0100)
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.

Link: https://lore.kernel.org/r/20220907145240.1683088-8-sudeep.holla@arm.com
Suggested-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_ffa/bus.c
drivers/firmware/arm_ffa/driver.c
drivers/tee/optee/ffa_abi.c
include/linux/arm_ffa.h

index 69328041fbc33bdc4f871f2de0bc2e69b10fbae5..99d43948061260377130e43d0918ca19c5301557 100644 (file)
@@ -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;
index e4fd357730713811eacd2b47dedce3d07d86ad3f..2532e0f16cc968e9bd2d1549fb6a91e95a48196b 100644 (file)
@@ -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,
index 7257b42d0545ffdc88c3a0b7ec2c5b68ecf17960..2ce5b87dfb2713737bbb128cc59b2ec09ce95510 100644 (file)
@@ -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;
index eafab07c9f58695e70b6c2d7a54bd137832b3fba..4c4b067830351607de07b19573e25a14fd6836e3 100644 (file)
@@ -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);