remarkable-linux/drivers/base
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
..
power ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle 2017-05-05 22:54:28 +02:00
regmap Merge remote-tracking branches 'regmap/topic/doc' and 'regmap/topic/rbtree' into regmap-next 2017-02-03 12:34:59 +01:00
test driver core: test_async: fix up typo found by 0-day 2016-11-29 22:06:42 +01:00
attribute_container.c
base.h Revert "driver core: Add deferred_probe attribute to devices in sysfs" 2017-01-14 14:09:03 +01:00
bus.c
cacheinfo.c Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-22 09:25:45 -08:00
class.c driver core: class: add class_groups support 2016-11-29 21:12:12 +01:00
component.c
container.c
core.c drivers core: remove assert_held_device_hotplug() 2017-03-16 16:56:19 -07:00
cpu.c CPU / PM: expose pm_qos_resume_latency for CPUs 2017-01-30 11:05:29 +01:00
dd.c Revert "driver core: Add deferred_probe attribute to devices in sysfs" 2017-01-14 14:09:03 +01:00
devcoredump.c driver core: devcoredump: convert to use class_groups 2016-11-29 21:12:12 +01:00
devres.c devres: add devm_alloc_percpu() 2016-11-15 22:34:25 -05:00
devtmpfs.c statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
dma-coherent.c drivers: dma-coherent: Move spinlock in dma_alloc_from_coherent() 2016-09-28 17:53:16 +02:00
dma-contiguous.c mm: wire up GFP flag passing in dma_alloc_from_contiguous 2017-02-24 17:46:55 -08:00
dma-mapping.c drivers: base: dma-mapping: Fix typo in dmam_alloc_non_coherent comments 2016-11-30 13:04:53 +01:00
driver.c
firmware.c
firmware_class.c firmware: fix NULL pointer dereference in __fw_load_abort() 2017-01-27 09:19:48 +01:00
hypervisor.c
init.c
isa.c
Kconfig Driver core patches for 4.10-rc1 2016-12-13 11:42:18 -08:00
Makefile driver-core: add test module for asynchronous probing 2016-11-10 17:28:16 +01:00
map.c
memory.c memory-hotplug: use dev_online for memhp_auto_online 2017-02-24 17:46:56 -08:00
module.c
node.c
pinctrl.c
platform-msi.c irq/platform-msi: Fix comment about maximal MSIs 2017-01-17 09:53:14 +01:00
platform.c driver core patches for 4.11-rc1 2017-02-22 11:44:32 -08:00
property.c device property: export code duplicating array of property entries 2017-02-07 13:21:15 +01:00
soc.c base: soc: Check for NULL SoC device attributes 2016-11-10 10:10:33 +01:00
syscore.c
topology.c drivers base/topology: Convert to hotplug state machine 2016-11-09 23:45:29 +01:00
transport_class.c