linux/arch/arm64
James Morse 1fe492ce64 arm64: hibernate: Refuse to hibernate if the boot cpu is offline
Hibernation represents a system state save/restore through
a system reboot; this implies that the logical cpus carrying
out hibernation/thawing must be the same, so that the context
saved in the snapshot image on hibernation is consistent with
the state of the system on resume. If resume from hibernation
is driven through kernel command line parameter, the cpu responsible
for thawing the system will be whatever CPU firmware boots the system
on upon cold-boot (ie logical cpu 0); this means that in order to
keep system context consistent between the hibernate snapshot image
and system state on kernel resume from hibernate, logical cpu 0 must
be online on hibernation and must be the logical cpu that creates
the snapshot image.

This patch adds a PM notifier that enforces logical cpu 0 is online
when the hibernation is started (and prevents hibernation if it is
not), which is sufficient to guarantee it will be the one creating
the snapshot image therefore providing the resume cpu a consistent
snapshot of the system to resume to.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-04-28 13:36:23 +01:00
..
boot ARM: DT changes, part 2 2016-03-24 19:01:38 -07:00
configs arm64: defconfig: updates for 4.6 2016-03-29 16:56:00 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
include arm64: kernel: Add support for hibernate/suspend-to-disk 2016-04-28 13:36:22 +01:00
kernel arm64: hibernate: Refuse to hibernate if the boot cpu is offline 2016-04-28 13:36:23 +01:00
kvm arm64: kvm: allows kvm cpu hotplug 2016-04-28 12:05:46 +01:00
lib arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00
mm arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va 2016-04-28 12:05:46 +01:00
net arm64: bpf: add extra pass to handle faulty codegen 2016-01-17 19:15:26 -05:00
xen xen/arm: introduce HYPERVISOR_platform_op on arm and arm64 2015-12-21 14:40:56 +00:00
Kconfig arm64: kernel: Add support for hibernate/suspend-to-disk 2016-04-28 13:36:22 +01:00
Kconfig.debug arm64: simplify kernel segment mapping granularity 2016-04-14 18:11:44 +01:00
Kconfig.platforms Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-24 10:29:44 -07:00
Makefile arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00