mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 23:35:10 +00:00
Merge "refactor(el3-spmc): avoid unneeded function call" into integration
This commit is contained in:
commit
dbe4765c30
1 changed files with 1 additions and 21 deletions
|
@ -247,25 +247,6 @@ spmc_shmem_obj_get_comp_mrd(struct spmc_shmem_obj *obj, uint32_t ffa_version)
|
||||||
((uint8_t *)(&obj->desc) + emad->comp_mrd_offset);
|
((uint8_t *)(&obj->desc) + emad->comp_mrd_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* spmc_shmem_obj_ffa_constituent_size - Calculate variable size part of obj.
|
|
||||||
* @obj: Object containing ffa_memory_region_descriptor.
|
|
||||||
*
|
|
||||||
* Return: Size of ffa_constituent_memory_region_descriptors in @obj.
|
|
||||||
*/
|
|
||||||
static size_t
|
|
||||||
spmc_shmem_obj_ffa_constituent_size(struct spmc_shmem_obj *obj,
|
|
||||||
uint32_t ffa_version)
|
|
||||||
{
|
|
||||||
struct ffa_comp_mrd *comp_mrd;
|
|
||||||
|
|
||||||
comp_mrd = spmc_shmem_obj_get_comp_mrd(obj, ffa_version);
|
|
||||||
if (comp_mrd == NULL) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return comp_mrd->address_range_count * sizeof(struct ffa_cons_mrd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spmc_shmem_obj_validate_id - Validate a partition ID is participating in
|
* spmc_shmem_obj_validate_id - Validate a partition ID is participating in
|
||||||
* a given memory transaction.
|
* a given memory transaction.
|
||||||
|
@ -902,8 +883,7 @@ static int spmc_shmem_check_obj(struct spmc_shmem_obj *obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
expected_size = offset + sizeof(*comp) +
|
expected_size = offset + sizeof(*comp) +
|
||||||
spmc_shmem_obj_ffa_constituent_size(obj,
|
count * sizeof(struct ffa_cons_mrd);
|
||||||
ffa_version);
|
|
||||||
|
|
||||||
if (expected_size != obj->desc_size) {
|
if (expected_size != obj->desc_size) {
|
||||||
WARN("%s: invalid object, computed size %zu != size %zu\n",
|
WARN("%s: invalid object, computed size %zu != size %zu\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue