diff options
author | Kalyani Chidambaram <kalyanic@nvidia.com> | 2018-10-03 17:00:17 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2020-03-18 17:46:58 -0700 |
commit | 3bab03eb4ba00e021fc3e89c8f41c3e00cfb8dda (patch) | |
tree | 7ba52c9bb012d72321757d2b3f88444dace0e8c8 /plat | |
parent | 0be136d293c6cec9da1c116e5b2ae353a21b9c49 (diff) | |
download | platform_external_arm-trusted-firmware-3bab03eb4ba00e021fc3e89c8f41c3e00cfb8dda.tar.gz platform_external_arm-trusted-firmware-3bab03eb4ba00e021fc3e89c8f41c3e00cfb8dda.tar.bz2 platform_external_arm-trusted-firmware-3bab03eb4ba00e021fc3e89c8f41c3e00cfb8dda.zip |
Tegra: aarch64: calculate core position from one place
This patch updates 'plat_my_core_pos' handler to call
'plat_core_pos_from_mpidr' instead of implementing the same logic
at two places.
Change-Id: I1e56adaa10dc2fe3440e5507e0e260d8932e6657
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
Diffstat (limited to 'plat')
-rw-r--r-- | plat/nvidia/tegra/common/aarch64/tegra_helpers.S | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S b/plat/nvidia/tegra/common/aarch64/tegra_helpers.S index 7cba3a449..b6622c7f1 100644 --- a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S +++ b/plat/nvidia/tegra/common/aarch64/tegra_helpers.S @@ -140,17 +140,14 @@ endfunc plat_is_my_cpu_primary * unsigned int plat_my_core_pos(void); * * result: CorePos = CoreId + (ClusterId * cpus per cluster) + * Registers clobbered: x0, x8 * ---------------------------------------------------------- */ func plat_my_core_pos + mov x8, x30 mrs x0, mpidr_el1 - and x1, x0, #MPIDR_CPU_MASK - and x0, x0, #MPIDR_CLUSTER_MASK - lsr x0, x0, #MPIDR_AFFINITY_BITS - mov x2, #PLATFORM_MAX_CPUS_PER_CLUSTER - mul x0, x0, x2 - add x0, x1, x0 - ret + bl plat_core_pos_by_mpidr + ret x8 endfunc plat_my_core_pos /* ----------------------------------------------------- |