mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
refactor(spmd): move plat_my_core_pos calls
By tracing instruction execution, it is observed: Placing plat_my_core_pos at top of functions translate by the compiler into calling those functions even if the result is not consumed when not printed. plat_my_core_pos is used to retrieve the core id for the currently running core, but effectively call sites are only consuming it for verbosity purposes. Move plat_my_core_pos calls into the print functions that require it. Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: Ia3549453b5e4de7c575a8887a4d19e318658d03e
This commit is contained in:
parent
107e3cc0cb
commit
eac8077a37
1 changed files with 2 additions and 4 deletions
|
@ -202,7 +202,6 @@ static uint64_t spmd_secure_interrupt_handler(uint32_t id,
|
|||
{
|
||||
spmd_spm_core_context_t *ctx = spmd_get_context();
|
||||
gp_regs_t *gpregs = get_gpregs_ctx(&ctx->cpu_ctx);
|
||||
unsigned int linear_id = plat_my_core_pos();
|
||||
int64_t rc;
|
||||
|
||||
/* Sanity check the security state when the exception was generated */
|
||||
|
@ -233,7 +232,7 @@ static uint64_t spmd_secure_interrupt_handler(uint32_t id,
|
|||
|
||||
rc = spmd_spm_core_sync_entry(ctx);
|
||||
if (rc != 0ULL) {
|
||||
ERROR("%s failed (%" PRId64 ") on CPU%u\n", __func__, rc, linear_id);
|
||||
ERROR("%s failed (%" PRId64 ") on CPU%u\n", __func__, rc, plat_my_core_pos());
|
||||
}
|
||||
|
||||
ctx->secure_interrupt_ongoing = false;
|
||||
|
@ -839,7 +838,6 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
|
|||
void *handle,
|
||||
uint64_t flags)
|
||||
{
|
||||
unsigned int linear_id = plat_my_core_pos();
|
||||
spmd_spm_core_context_t *ctx = spmd_get_context();
|
||||
bool secure_origin;
|
||||
int ret;
|
||||
|
@ -850,7 +848,7 @@ uint64_t spmd_smc_handler(uint32_t smc_fid,
|
|||
|
||||
VERBOSE("SPM(%u): 0x%x 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64
|
||||
" 0x%" PRIx64 " 0x%" PRIx64 " 0x%" PRIx64 "\n",
|
||||
linear_id, smc_fid, x1, x2, x3, x4,
|
||||
plat_my_core_pos(), smc_fid, x1, x2, x3, x4,
|
||||
SMC_GET_GP(handle, CTX_GPREG_X5),
|
||||
SMC_GET_GP(handle, CTX_GPREG_X6),
|
||||
SMC_GET_GP(handle, CTX_GPREG_X7));
|
||||
|
|
Loading…
Add table
Reference in a new issue