diff options
author | Tomasz Figa <t.figa@samsung.com> | 2014-07-16 02:59:18 +0900 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-07-18 17:12:57 -0700 |
commit | 9637f30e6b7bc394c08fa9d27d63622f141142e9 (patch) | |
tree | c74803fdc530a45f1045154c5d5bf841545485ed /arch/arm/mach-exynos/hotplug.c | |
parent | e5c6cac6e3977d1add2f64a0b1c6565fa4c94429 (diff) | |
download | blackbird-op-linux-9637f30e6b7bc394c08fa9d27d63622f141142e9.tar.gz blackbird-op-linux-9637f30e6b7bc394c08fa9d27d63622f141142e9.zip |
ARM: EXYNOS: Fix core ID used by platsmp and hotplug code
When CPU topology is specified in device tree, cpu_logical_map() does
not return core ID anymore, but rather full MPIDR value. This breaks
existing calculation of PMU register offsets on Exynos SoCs.
This patch fixes the problem by adjusting the code to use only core ID
bits of the value returned by cpu_logical_map() to allow CPU topology to
be specified in device tree on Exynos SoCs.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-exynos/hotplug.c')
-rw-r--r-- | arch/arm/mach-exynos/hotplug.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 8a134d019cb3..920a4baa53cd 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -40,15 +40,17 @@ static inline void cpu_leave_lowpower(void) static inline void platform_do_lowpower(unsigned int cpu, int *spurious) { + u32 mpidr = cpu_logical_map(cpu); + u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); + for (;;) { - /* make cpu1 to be turned off at next WFI command */ - if (cpu == 1) - exynos_cpu_power_down(cpu); + /* Turn the CPU off on next WFI instruction. */ + exynos_cpu_power_down(core_id); wfi(); - if (pen_release == cpu_logical_map(cpu)) { + if (pen_release == core_id) { /* * OK, proper wakeup, we're done */ |