[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e7990bc3dc128e5056c3bad381e548a49ab67c81.1737522729.git.viresh.kumar@linaro.org>
Date: Wed, 22 Jan 2025 10:53:43 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Sudeep Holla <sudeep.holla@....com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Alex Bennée <alex.bennee@...aro.org>,
Bill Mills <bill.mills@...aro.org>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] firmware: arm_ffa: Allow multiple UUIDs per partition
A partition can implement multiple UUIDs and adding the same partition
twice will fail. Don't try to add a partition again, if it is already
added earlier.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/firmware/arm_ffa/driver.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index b824c7c024fd..6de941821319 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -1389,6 +1389,10 @@ static int ffa_add_partition_info(int vm_id)
struct ffa_dev_part_info *info;
int ret;
+ /* Already added ? */
+ if (xa_load(&drv_info->partition_info, vm_id))
+ return 0;
+
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
--
2.31.1.272.g89b43f80a514
Powered by blists - more mailing lists