FVP: change the method for translating MPIDR values to a linear indices
x3 will be assigned by the folloing instructions.
So the first instruction is not needed any more.

old method:
  (ClusterId * FVP_MAX_CPUS_PER_CLUSTER)
+ (CPUId * FVP_MAX_PE_PER_CPU)
+ ThreadId

it should be
  (ClusterId * FVP_MAX_CPUS_PER_CLUSTER) * FVP_MAX_PE_PER_CPU
+ (CPUId * FVP_MAX_PE_PER_CPU)
+ ThreadId

which can be simplified as:
(ClusterId * FVP_MAX_CPUS_PER_CLUSTER + CPUId) * FVP_MAX_PE_PER_CPU + ThreadId

Signed-off-by: Wang Feng <feng_feng.wang@spreadtrum.com>
1 parent 16b05e9 commit 39b21d19a01bc8eac3ab5f21a3cf96cd5e9a4f42
@Wang Feng Wang Feng authored on 15 Mar 2018
Showing 1 changed file
View
plat/arm/board/fvp/aarch64/fvp_helpers.S