mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
firmware: arm_ffa: Handle the presence of host partition in the partition info
Currently it is assumed that the firmware doesn't present the host partition in the list of partitions presented as part of the response to PARTITION_INFO_GET from the firmware. However, there are few platforms that prefer to present the same in the list of partitions. It is not manadatory but not restricted as well. So handle the same by making sure to check the presence of the host VM ID in the XArray partition information maintained/managed in the driver before attempting to add it. Tested-by: Viresh Kumar <viresh.kumar@linaro.org> Message-Id: <20250217-ffa_updates-v3-7-bd1d9de615e7@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
parent
3c3d676746
commit
2f622a8b07
|
|
@ -1488,6 +1488,10 @@ static int ffa_setup_partitions(void)
|
|||
|
||||
kfree(pbuf);
|
||||
|
||||
/* Check if the host is already added as part of partition info */
|
||||
if (xa_load(&drv_info->partition_info, drv_info->vm_id))
|
||||
return 0;
|
||||
|
||||
/* Allocate for the host */
|
||||
ret = ffa_xa_add_partition_info(drv_info->vm_id);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user