[PATCH 0/4][RFC v2] x86, hotplug: Use hlt instead of mwait when resuming from hibernation

From: Chen Yu
Date: Sat Jun 25 2016 - 12:11:15 EST


Currently it is reported that, when system is trying to resume
from hibernation, the nonboot CPUs might be incorrectly woken up
and hang there. The reason for this is because of inconsistent
page tables across hibernation resume. To avoid this situation,
use hlt instead of mwait to put nonboot CPUs in a more safe state
and just let them watch the boot CPU to do all the things and
wakes them up later.

The first three patches are preparation for the fourth one, please
refer to [4/4] for detail.

Chen Yu (4):
PM / sleep: Avoid accessing frozen_cpus if it is NULL
PM / sleep: Introduce arch-specific hook for disable/enable nonboot
cpus
PM / hibernate: introduce a flag to indicate resuming from hibernation
x86, hotplug: Use hlt instead of mwait when resuming from hibernation

arch/x86/kernel/smpboot.c | 15 +++++++++++++++
include/linux/cpu.h | 2 ++
include/linux/suspend.h | 7 +++++++
kernel/cpu.c | 38 ++++++++++++++++++++++++++++++++++++++
kernel/power/hibernate.c | 3 +++
5 files changed, 65 insertions(+)

--
2.7.4