linux/arch/arm/mach-mvebu
Thomas Petazzoni b9b1de0f4d ARM: mvebu: synchronize secondary CPU clocks on resume
The Armada XP has multiple cores clocked by independent clocks. The
SMP startup code contains a function called set_secondary_cpus_clock()
called in armada_xp_smp_prepare_cpus() to ensure the clocks of the
secondary CPUs match the clock of the boot CPU.

With the introduction of suspend/resume, this operation is no longer
needed when booting the system, but also when existing the suspend to
RAM state. Therefore this commit reworks a bit the logic: instead of
configuring the clock of all secondary CPUs in
armada_xp_smp_prepare_cpus(), we do it on a per-secondary CPU basis in
armada_xp_boot_secondary(), as this function gets called when existing
suspend to RAM for each secondary CPU.

Since the function now only takes care of one CPU, we rename it from
set_secondary_cpus_clock() to set_secondary_cpu_clock(), and it looses
its __init marker, as it is now used beyond the system initialization.

Note that we can't use smp_processor_id() directly, because when
exiting from suspend to RAM, the code is apparently executed with
preemption enabled, so smp_processor_id() is not happy (prints a
warning). We therefore switch to using get_cpu()/put_cpu(), even
though we pretty much have the guarantee that the code starting the
secondary CPUs is going to run on the boot CPU and will not be
migrated.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1416585613-2113-14-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-11-30 16:40:16 +00:00
..
include/mach ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
armada-370-xp.h ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c 2014-07-24 11:46:13 +00:00
board-v7.c ARM: mvebu: reserve the first 10 KB of each memory bank for suspend/resume 2014-11-30 16:40:13 +00:00
board.h ARM: Kirkwood: Add setup file for netxbig LEDs 2014-06-20 23:47:27 +00:00
coherency_ll.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
coherency.c ARM: mvebu: Fix coherency bus notifiers by using separate notifiers 2014-07-08 13:53:53 +00:00
coherency.h ARM: mvebu: Remove the unused argument of set_cpu_coherent() 2014-05-08 16:18:52 +00:00
common.h ARM: mvebu: implement suspend/resume support for Armada XP 2014-11-30 16:40:12 +00:00
cpu-reset.c ARM: mvebu: Staticize mvebu_cpu_reset_init 2014-06-30 17:41:04 +00:00
dove.c bus: mvebu: pass the coherency availability information at init time 2014-04-24 05:00:36 +00:00
headsmp-a9.S Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2014-08-05 10:05:29 -07:00
headsmp.S ARM: mvebu: Split low level functions to manipulate HW coherency 2014-05-08 16:18:54 +00:00
Kconfig mvebu SoC changes for v3.17 (round 4) 2014-07-26 18:17:08 +02:00
kirkwood-pm.c ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
kirkwood-pm.h ARM: mvebu: Move kirkwood DT boards into mach-mvebu 2014-02-22 21:19:55 +00:00
kirkwood.c ARM: Kirkwood: Add setup file for netxbig LEDs 2014-06-20 23:47:27 +00:00
kirkwood.h ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
Makefile ARM: mvebu: Armada XP GP specific suspend/resume code 2014-11-30 16:40:14 +00:00
mvebu-soc-id.c ARM: mvebu: Use system controller to get the soc id when possible 2014-06-30 17:40:59 +00:00
mvebu-soc-id.h ARM: mvebu: add Armada 375 A0 revision definition 2014-05-08 16:40:14 +00:00
netxbig.c ARM: Kirkwood: Add setup file for netxbig LEDs 2014-06-20 23:47:27 +00:00
platsmp-a9.c ARM: mvebu: use the common function for Armada 375 SMP workaround 2014-07-24 11:46:10 +00:00
platsmp.c ARM: mvebu: synchronize secondary CPU clocks on resume 2014-11-30 16:40:16 +00:00
pm-board.c ARM: mvebu: Armada XP GP specific suspend/resume code 2014-11-30 16:40:14 +00:00
pm.c ARM: mvebu: implement suspend/resume support for Armada XP 2014-11-30 16:40:12 +00:00
pmsu_ll.S ARM: mvebu: make sure MMU is disabled in armada_370_xp_cpu_resume 2014-11-30 16:40:15 +00:00
pmsu.c cpufreq: cpu0: rename driver and internals to 'cpufreq_dt' 2014-10-03 15:37:54 +02:00
pmsu.h ARM: mvebu: implement suspend/resume support for Armada XP 2014-11-30 16:40:12 +00:00
system-controller.c ARM: mvebu: use the common function for Armada 375 SMP workaround 2014-07-24 11:46:10 +00:00