All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	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: [PATCH 8/9] tee: optee: Drop ffa_ops in optee_ffa structure
Date: Tue, 30 Aug 2022 11:06:59 +0100	[thread overview]
Message-ID: <20220830100700.344594-9-sudeep.holla@arm.com> (raw)
In-Reply-To: <20220830100700.344594-1-sudeep.holla@arm.com>

Since the ffa_device itself carries ffa_dev_ops now, there is no need
to keep a copy in optee_ffa structure.

Drop ffa_ops in the optee_ffa structure as it is not needed anymore.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/tee/optee/ffa_abi.c       | 9 ++++-----
 drivers/tee/optee/optee_private.h | 1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 7ec0a2f9a63b..7257b42d0545 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -271,8 +271,8 @@ static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
 				  unsigned long start)
 {
 	struct optee *optee = tee_get_drvdata(ctx->teedev);
-	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
 	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
+	const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
 	struct ffa_mem_region_attributes mem_attr = {
 		.receiver = ffa_dev->vm_id,
 		.attrs = FFA_MEM_RW,
@@ -314,8 +314,8 @@ static int optee_ffa_shm_unregister(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_ops;
 	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
+	const struct ffa_dev_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_ops;
+	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_dev->ops;
 	u64 global_handle = shm->sec_world_id;
 	int rc;
 
@@ -529,8 +529,8 @@ static int optee_ffa_yielding_call(struct tee_context *ctx,
 				   struct optee_msg_arg *rpc_arg)
 {
 	struct optee *optee = tee_get_drvdata(ctx->teedev);
-	const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops;
 	struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
+	const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
 	struct optee_call_waiter w;
 	u32 cmd = data->data0;
 	u32 w4 = data->data1;
@@ -817,7 +817,6 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
 
 	optee->ops = &optee_ffa_ops;
 	optee->ffa.ffa_dev = ffa_dev;
-	optee->ffa.ffa_ops = ffa_ops;
 	optee->rpc_param_count = rpc_param_count;
 
 	teedev = tee_device_alloc(&optee_ffa_clnt_desc, NULL, optee->pool,
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
index a33d98d17cfd..04ae58892608 100644
--- a/drivers/tee/optee/optee_private.h
+++ b/drivers/tee/optee/optee_private.h
@@ -111,7 +111,6 @@ struct optee_smc {
  */
 struct optee_ffa {
 	struct ffa_device *ffa_dev;
-	const struct ffa_dev_ops *ffa_ops;
 	/* Serializes access to @global_ids */
 	struct mutex mutex;
 	struct rhashtable global_ids;
-- 
2.37.2


  parent reply	other threads:[~2022-08-30 10:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 10:06 [PATCH 0/9] firmware: arm_ffa: Refactoring and initial/minor v1.1 update Sudeep Holla
2022-08-30 10:06 ` [PATCH 1/9] firmware: arm_ffa: Add pointer to the ffa_dev_ops in struct ffa_dev Sudeep Holla
2022-09-01  7:42   ` Jens Wiklander
2022-08-30 10:06 ` [PATCH 2/9] tee: optee: Use ffa_dev->ops directly Sudeep Holla
2022-08-31  7:38   ` Sumit Garg
2022-09-01  7:21   ` Jens Wiklander
2022-08-30 10:06 ` [PATCH 3/9] firmware: arm_ffa: Remove ffa_dev_ops_get() Sudeep Holla
2022-09-01  7:39   ` Jens Wiklander
2022-08-30 10:06 ` [PATCH 4/9] firmware: arm_ffa: Add support for querying FF-A features Sudeep Holla
2022-09-01  7:56   ` Jens Wiklander
2022-09-01  9:04     ` Sudeep Holla
2022-09-01 11:32       ` Jens Wiklander
2022-08-30 10:06 ` [PATCH 5/9] firmware: arm_ffa: Use FFA_FEATURES to detect if native versions are supported Sudeep Holla
2022-09-01  8:18   ` Jens Wiklander
2022-08-30 10:06 ` [PATCH 6/9] firmware: arm_ffa: Make memory apis ffa_device independent Sudeep Holla
2022-08-31 10:46   ` Sumit Garg
2022-08-31 12:26     ` Sudeep Holla
2022-08-30 10:06 ` [PATCH 7/9] firmware: arm_ffa: Add v1.1 get_partition_info support Sudeep Holla
2022-09-01  8:43   ` Jens Wiklander
2022-09-01  8:57     ` Sudeep Holla
2022-09-01  9:37       ` Jens Wiklander
2022-08-30 10:06 ` Sudeep Holla [this message]
2022-08-31 10:58   ` [PATCH 8/9] tee: optee: Drop ffa_ops in optee_ffa structure Sumit Garg
2022-08-31 11:26     ` Sudeep Holla
2022-08-31 11:29       ` Sumit Garg
2022-09-01  7:26         ` Jens Wiklander
2022-08-30 10:07 ` [PATCH 9/9] firmware: arm_ffa: Split up ffa_dev_ops into info, message and memory operations Sudeep Holla
2022-09-01  8:49   ` Jens Wiklander

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=20220830100700.344594-9-sudeep.holla@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=achin.gupta@arm.com \
    --cc=coboy.chen@mediatek.com \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.hanel@trustonic.com \
    --cc=marc.bonnici@arm.com \
    --cc=op-tee@lists.trustedfirmware.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.