* [PATCH 3/3][v2] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle
@ 2015-10-24 17:02 Chen Yu
0 siblings, 0 replies; only message in thread
From: Chen Yu @ 2015-10-24 17:02 UTC (permalink / raw)
To: rjw, lenb
Cc: rui.zhang, lv.zheng, linux-acpi, linux-kernel, linux-pm, Chen Yu,
stable
For ACPI compatible system, SCI(ACPI System Control
Interrupt) is used to wake the system up from suspend-to-idle.
Once the CPU is woken up by SCI, the interrupt handler will
firstly check if the current interrupt is legal to wake up
the whole system, thus irq_pm_check_wakeup is invoked
to validate the irq number. However, before suspend-to-idle,
acpi_gbl_FADT.sci_interrupt is marked rather than actual
irq number in acpi_freeze_prepare, this might lead to unable
to wake up the system.
This patch fixes this problem by marking the irq number
returned by acpi_gsi_to_irq as IRQD_WAKEUP_STATE, rather than
marking the acpi_gbl_FADT.sci_interrupt.
Cc: <stable@vger.kernel.org> # 3.18+
Acked-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
drivers/acpi/sleep.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2f0d4db..3fe1fbe 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -632,14 +632,16 @@ static int acpi_freeze_prepare(void)
acpi_enable_wakeup_devices(ACPI_STATE_S0);
acpi_enable_all_wakeup_gpes();
acpi_os_wait_events_complete();
- enable_irq_wake(acpi_gbl_FADT.sci_interrupt);
+ if (acpi_sci_irq_valid())
+ enable_irq_wake(acpi_sci_irq);
return 0;
}
static void acpi_freeze_restore(void)
{
acpi_disable_wakeup_devices(ACPI_STATE_S0);
- disable_irq_wake(acpi_gbl_FADT.sci_interrupt);
+ if (acpi_sci_irq_valid())
+ disable_irq_wake(acpi_sci_irq);
acpi_enable_all_runtime_gpes();
}
--
1.8.4.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-24 17:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-24 17:02 [PATCH 3/3][v2] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle Chen Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).