linux/kernel/power
Rafael J. Wysocki eed4d47efe ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle
The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ
during suspend-to-idle transitions and, consequently, any events
signaled through it wake up the system from that state.  However,
on some systems some of the events signaled via the ACPI SCI while
suspended to idle should not cause the system to wake up.  In fact,
quite often they should just be discarded.

Arguably, systems should not resume entirely on such events, but in
order to decide which events really should cause the system to resume
and which are spurious, it is necessary to resume up to the point
when ACPI SCIs are actually handled and processed, which is after
executing dpm_resume_noirq() in the system resume path.

For this reasons, add a loop around freeze_enter() in which the
platforms can process events signaled via multiplexed IRQ lines
like the ACPI SCI and add suspend-to-idle hooks that can be
used for this purpose to struct platform_freeze_ops.

In the ACPI case, the ->wake hook is used for checking if the SCI
has triggered while suspended and deferring the interrupt-induced
system wakeup until the events signaled through it are actually
processed sufficiently to decide whether or not the system should
resume.  In turn, the ->sync hook allows all of the relevant event
queues to be flushed so as to prevent events from being missed due
to race conditions.

In addition to that, some ACPI code processing wakeup events needs
to be modified to use the "hard" version of wakeup triggers, so that
it will cause a system resume to happen on device-induced wakeup
events even if the "soft" mechanism to prevent the system from
suspending is not enabled (that also helps to catch device-induced
wakeup events occurring during suspend transitions in progress).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-05-05 22:54:28 +02:00
..
autosleep.c PM / Sleep: avoid 'autosleep' in shutdown progress 2013-07-15 01:31:37 +02:00
console.c PM / sleep: Make pm_prepare_console() return void 2016-06-15 01:26:04 +02:00
hibernate.c Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-03-03 10:16:38 -08:00
Kconfig PM / sleep: Increase default DPM watchdog timeout to 120 2016-09-13 02:15:58 +02:00
main.c PM / sleep: System sleep state selection interface rework 2016-11-21 22:45:40 +01:00
Makefile PM / Hibernate: Don't let kasan instrument snapshot.c 2016-06-14 00:38:56 +02:00
power.h arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX 2017-02-07 12:32:52 -08:00
poweroff.c power/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
process.c ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle 2017-05-05 22:54:28 +02:00
qos.c power, workqueue: remove keventd_up() usage 2016-09-17 13:18:21 -04:00
snapshot.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/nmi.h> 2017-03-02 08:42:30 +01:00
suspend_test.c PM / sleep: Fix test_suspend after sleep state rework 2017-02-18 02:16:27 +01:00
suspend.c ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle 2017-05-05 22:54:28 +02:00
swap.c PM / Hibernate: Use rb_entry() instead of container_of() 2017-01-27 11:31:12 +01:00
user.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
wakelock.c PM / autosleep: Use workqueue for user space wakeup sources garbage collector 2015-07-14 21:04:48 +02:00