Merge branch 'pm-genirq' into acpi-pm
This commit is contained in:
commit
e4cb0c9e92
14 changed files with 419 additions and 121 deletions
|
|
@ -24,6 +24,9 @@
|
|||
*/
|
||||
bool events_check_enabled __read_mostly;
|
||||
|
||||
/* If set and the system is suspending, terminate the suspend. */
|
||||
static bool pm_abort_suspend __read_mostly;
|
||||
|
||||
/*
|
||||
* Combined counters of registered wakeup events and wakeup events in progress.
|
||||
* They need to be modified together atomically, so it's better to use one
|
||||
|
|
@ -719,7 +722,18 @@ bool pm_wakeup_pending(void)
|
|||
pm_print_active_wakeup_sources();
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret || pm_abort_suspend;
|
||||
}
|
||||
|
||||
void pm_system_wakeup(void)
|
||||
{
|
||||
pm_abort_suspend = true;
|
||||
freeze_wake();
|
||||
}
|
||||
|
||||
void pm_wakeup_clear(void)
|
||||
{
|
||||
pm_abort_suspend = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <linux/syscore_ops.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <trace/events/power.h>
|
||||
|
||||
static LIST_HEAD(syscore_ops_list);
|
||||
|
|
@ -54,9 +54,8 @@ int syscore_suspend(void)
|
|||
pr_debug("Checking wakeup interrupts\n");
|
||||
|
||||
/* Return error code if there are any wakeup interrupts pending. */
|
||||
ret = check_wakeup_irqs();
|
||||
if (ret)
|
||||
return ret;
|
||||
if (pm_wakeup_pending())
|
||||
return -EBUSY;
|
||||
|
||||
WARN_ONCE(!irqs_disabled(),
|
||||
"Interrupts enabled before system core suspend.\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue