arm64: hibernate: Don't hibernate on systems with stuck CPUs
authorJames Morse <james.morse@arm.com>
Wed, 22 Jun 2016 09:06:13 +0000 (10:06 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 22 Jun 2016 14:48:10 +0000 (15:48 +0100)
commitd74b4e4f1a6dbe27acce723e071c86a6ed154bf2
tree41ddeb5bc6ef1201129a009cc123e80e9a0d16b2
parent5c492c3f5255bd34f7ff8867515ecf98dcba2a2e
arm64: hibernate: Don't hibernate on systems with stuck CPUs

Hibernate relies on cpu hotplug to prevent secondary cores executing
the kernel text while it is being restored.

Add a call to cpus_are_stuck_in_kernel() to determine if there are
CPUs not counted by 'num_online_cpus()', and prevent hibernate in this
case.

Fixes: 82869ac57b5 ("arm64: kernel: Add support for hibernate/suspend-to-disk")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/hibernate.c