Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c891a392 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Murali Nalajala
Browse files

ARM: suspend: use hash of cpu_logical_map value to index into save array



Currently we hash the MPIDR of the CPU being suspended to determine which
entry in the sleep_save_sp array to use. In some situations, such as when
we want to resume on another physical CPU, the MPIDR of another CPU should
be used instead.

So let's use the value of cpu_logical_map(smp_processor_id()) in place
of the MPIDR in the suspend path.  This will result in the same index
being used as with the previous code unless the caller has modified
cpu_logical_map() beforehand with the MPIDR of the physical CPU the
suspending logical CPU will resume on.

Consequently, if doing a physical CPU migration, cpu_logical_map() must
be updated appropriately somewhere between cpu_pm_enter() and
cpu_suspend().

The register allocation in __cpu_suspend is reworked in order to better
accommodate the additional argument.

CRs-fixed: 673870
Change-Id: I8f23af3968d13d5178f8d982017af24199a1600f
Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarDave Martin <Dave.Martin@arm.com>
Git-commit: 71a8986d7e4845b6fca1298fe6e3233ce6fde0b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[mnalajal@codeaurora.org: Fix merge conflicts in setup.c]
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent d9226ec0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment