Browse Source

fix(tegra): return correct error code for plat_core_pos_by_mpidr

The error code for plat_core_pos_by_mpidr() for an invalid mpidr should
be -1 as mandated by portig guide, but for tegra t186 return value is
PSCI_E_NOT_PRESENT (-7) even though the comment at top of function says
that it should return -1.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I2b69bc1a56f7966f21b2a3c89c515ebde41e3eb8
pull/1993/merge
Manish Pandey 1 year ago
parent
commit
6bd79b13f8
  1. 4
      plat/nvidia/tegra/soc/t186/plat_setup.c

4
plat/nvidia/tegra/soc/t186/plat_setup.c

@ -302,14 +302,14 @@ int32_t plat_core_pos_by_mpidr(u_register_t mpidr)
*/
if ((cluster_id >= (u_register_t)PLATFORM_CLUSTER_COUNT) ||
(cpu_id >= (u_register_t)PLATFORM_MAX_CPUS_PER_CLUSTER)) {
ret = PSCI_E_NOT_PRESENT;
ret = -1;
} else {
/* calculate the core position */
pos = cpu_id + (cluster_id << 2U);
/* check for non-existent CPUs */
if ((pos == TEGRA186_CLUSTER0_CORE2) || (pos == TEGRA186_CLUSTER0_CORE3)) {
ret = PSCI_E_NOT_PRESENT;
ret = -1;
} else {
ret = (int32_t)pos;
}

Loading…
Cancel
Save