Browse Source

Tegra: use ClusterId for calculating core position

This patch modifies platform_get_core_pos() to use the Cluster ID
field as well to calculate the final index value. This helps the
system to store CPU data for multi-cluster configurations.

Change-Id: I76e35f723f741e995c6c9156e9d61b0b2cdd2709
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
pull/845/head
Varun Wadekar 9 years ago
parent
commit
bde81dcc7b
  1. 14
      plat/nvidia/tegra/common/aarch64/tegra_helpers.S

14
plat/nvidia/tegra/common/aarch64/tegra_helpers.S

@ -179,6 +179,20 @@ func plat_get_my_entrypoint
ret
endfunc plat_get_my_entrypoint
/* -----------------------------------------------------
* int platform_get_core_pos(int mpidr);
*
* With this function: CorePos = (ClusterId * 4) +
* CoreId
* -----------------------------------------------------
*/
func platform_get_core_pos
and x1, x0, #MPIDR_CPU_MASK
and x0, x0, #MPIDR_CLUSTER_MASK
add x0, x1, x0, LSR #6
ret
endfunc platform_get_core_pos
/* -----------------------------------------------------
* void plat_secondary_cold_boot_setup (void);
*

Loading…
Cancel
Save