Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM: Reintroduce dropped call to check_wakeup_irqs

Patch 2e711c04dbbf7a7732a3f7073b1fc285d12b369d
(PM: Remove sysdev suspend, resume and shutdown operations)
deleted sysdev_suspend(), which was being relied on to call
check_wakeup_irqs() in suspend. If check_wakeup_irqs() is not
called, wake interrupts that are pending when suspend is
entered may be lost. It also breaks IRQCHIP_MASK_ON_SUSPEND,
which is handled in check_wakeup_irqs().

This patch adds a call to check_wakeup_irqs() in syscore_suspend(),
similar to what was deleted in sysdev_suspend().

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

authored by

Colin Cross and committed by
Rafael J. Wysocki
88759622 e3bbfa78

+8
+8
drivers/base/syscore.c
··· 9 9 #include <linux/syscore_ops.h> 10 10 #include <linux/mutex.h> 11 11 #include <linux/module.h> 12 + #include <linux/interrupt.h> 12 13 13 14 static LIST_HEAD(syscore_ops_list); 14 15 static DEFINE_MUTEX(syscore_ops_lock); ··· 48 47 { 49 48 struct syscore_ops *ops; 50 49 int ret = 0; 50 + 51 + pr_debug("Checking wakeup interrupts\n"); 52 + 53 + /* Return error code if there are any wakeup interrupts pending. */ 54 + ret = check_wakeup_irqs(); 55 + if (ret) 56 + return ret; 51 57 52 58 WARN_ONCE(!irqs_disabled(), 53 59 "Interrupts enabled before system core suspend.\n");