linux_dsm_epyc7002/arch/arm/mach-vexpress
Dave Martin 33cb667a00 ARM: vexpress/TC2: Implement MCPM power_down_finish()
This patch implements the power_down_finish() method for TC2, to
enable the kernel to confirm when CPUs are safely powered down.

The information required for determining when a CPU is parked
cannot be obtained from any single place, so a few sources of
information must be combined:

  * mcpm_cpu_power_down() must be pending for the CPU, so that we
    don't get confused by false STANDBYWFI positives arising from
    CPUidle.  This is detected by waiting for the tc2_pm use count
    for the target CPU to reach 0.

  * Either the SPC must report that the CPU has asserted
    STANDBYWFI, or the TC2 tile's reset control logic must be
    holding the CPU in reset.

    Just checking for STANDBYWFI is not sufficient, because this
    signal is not latched when the the cluster is clamped off and
    powered down: the relevant status bits just drop to zero.  This
    means that STANDBYWFI status cannot be used for reliable
    detection of the last CPU in a cluster reaching WFI.

This patch is required in order for kexec to work with MCPM on TC2.

MCPM code was changed in commit 0de0d64675 ('ARM: 7848/1: mcpm:
Implement cpu_kill() to synchronise on powerdown'), and since then it
will hit a WARN_ON_ONCE() due to power_down_finish not being implemented
on the TC2 platform.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 14:12:14 -08:00
..
include/mach ARM: vexpress: Start using new Versatile Express infrastructure 2012-11-05 17:09:51 +00:00
core.h ARM: vexpress: Select multi-cluster SMP operation if required 2013-05-29 15:50:35 -04:00
ct-ca9x4.c irqchip: Move ARM gic.h to include/linux/irqchip/arm-gic.h 2013-01-12 10:47:32 -06:00
dcscb_setup.S ARM: vexpress/dcscb: handle platform coherency exit/setup and CCI 2013-05-29 15:50:35 -04:00
dcscb.c ARM: 7861/1: cacheflush: consolidate single-CPU ARMv7 cache disabling code 2013-10-29 11:06:23 +00:00
hotplug.c ARM: cpu hotplug: remove majority of cache flushing from platforms 2013-04-18 20:08:04 +01:00
Kconfig ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
Makefile ARM: vexpress/TC2: add support for CPU DVFS 2013-10-30 00:48:25 +01:00
platsmp.c ARM: vexpress: Select multi-cluster SMP operation if required 2013-05-29 15:50:35 -04:00
spc.c ARM: vexpress/TC2: Implement MCPM power_down_finish() 2013-11-25 14:12:14 -08:00
spc.h ARM: vexpress/TC2: Implement MCPM power_down_finish() 2013-11-25 14:12:14 -08:00
tc2_pm.c ARM: vexpress/TC2: Implement MCPM power_down_finish() 2013-11-25 14:12:14 -08:00
v2m.c ARM: vexpress: remove custom .init_time hook 2013-09-29 21:09:48 +02:00