arm64: smp_plat: add get_logical_index
authorMark Rutland <mark.rutland@arm.com>
Wed, 22 Apr 2015 16:26:18 +0000 (17:26 +0100)
committerMark Rutland <mark.rutland@arm.com>
Wed, 27 May 2015 12:21:34 +0000 (13:21 +0100)
commit6ee3c78cecc795e87de9552baca76ea88292556d
treee0680ce27c20aca86ff005bf51a00716225ff55b
parent538b9b25fa5dd372eeb3eabc85cb24d5df9e317b
arm64: smp_plat: add get_logical_index

The PSCI MIGRATE_INFO_UP_CPU call returns a physical ID, which we will
need to map back to a Linux logical ID.

Implement a reusable get_logical_index to map from a physical ID to a
logical ID.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/smp_plat.h