FVP: change the method for translating MPIDR values to a linear indices
authorWang Feng <feng_feng.wang@spreadtrum.com>
Thu, 15 Mar 2018 07:32:41 +0000 (15:32 +0800)
committerWang Feng <feng_feng.wang@spreadtrum.com>
Sat, 17 Mar 2018 06:51:58 +0000 (14:51 +0800)
commit39b21d19a01bc8eac3ab5f21a3cf96cd5e9a4f42
tree3ca832056dfc7388a0cb979a592d1b42e6f84138
parent16b05e94a2d1757cbb98de068c662d58a6919613
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>
plat/arm/board/fvp/aarch64/fvp_helpers.S