Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-28 Thread Rafael J. Wysocki
On Thursday, August 28, 2014 11:23:11 AM Thomas Gleixner wrote: > On Thu, 28 Aug 2014, Rafael J. Wysocki wrote: > > On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: > > > void suspend_device_irqs(void) > > > { > > > for_each_irq_desc(irq, desc) { > > > /* Disable the

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-28 Thread Thomas Gleixner
On Thu, 28 Aug 2014, Rafael J. Wysocki wrote: > On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: > > void suspend_device_irqs(void) > > { > > for_each_irq_desc(irq, desc) { > > /* Disable the interrupt unconditionally */ > > disable_irq(irq);

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-28 Thread Thomas Gleixner
On Thu, 28 Aug 2014, Rafael J. Wysocki wrote: On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: void suspend_device_irqs(void) { for_each_irq_desc(irq, desc) { /* Disable the interrupt unconditionally */ disable_irq(irq); We

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-28 Thread Rafael J. Wysocki
On Thursday, August 28, 2014 11:23:11 AM Thomas Gleixner wrote: On Thu, 28 Aug 2014, Rafael J. Wysocki wrote: On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: void suspend_device_irqs(void) { for_each_irq_desc(irq, desc) { /* Disable the interrupt

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-27 Thread Rafael J. Wysocki
On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: > On Wed, 27 Aug 2014, Rafael J. Wysocki wrote: > > The line of reasoning leading to that is as follows. > > > > The way suspend_device_irqs() works and the existing code in > > check_wakeup_irqs(), called by syscore_suspend(),

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-27 Thread Thomas Gleixner
On Wed, 27 Aug 2014, Rafael J. Wysocki wrote: > The line of reasoning leading to that is as follows. > > The way suspend_device_irqs() works and the existing code in > check_wakeup_irqs(), called by syscore_suspend(), imply that: > > (1) Interrupt handlers are not invoked for wakeup interrupts

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-27 Thread Thomas Gleixner
On Wed, 27 Aug 2014, Rafael J. Wysocki wrote: The line of reasoning leading to that is as follows. The way suspend_device_irqs() works and the existing code in check_wakeup_irqs(), called by syscore_suspend(), imply that: (1) Interrupt handlers are not invoked for wakeup interrupts

Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-27 Thread Rafael J. Wysocki
On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote: On Wed, 27 Aug 2014, Rafael J. Wysocki wrote: The line of reasoning leading to that is as follows. The way suspend_device_irqs() works and the existing code in check_wakeup_irqs(), called by syscore_suspend(), imply that:

[PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-26 Thread Rafael J. Wysocki
From: Rafael J. Wysocki Make IRQs enabled for system wakeup via enable_irq_wake() wake up the system from suspend-to-idle. For this purpose, introduce a new routine, wakeup_mode_for_irqs(), for switching wakeup IRQs into a special "wakeup mode" and back from it and make freeze_enter() call it

[PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

2014-08-26 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com Make IRQs enabled for system wakeup via enable_irq_wake() wake up the system from suspend-to-idle. For this purpose, introduce a new routine, wakeup_mode_for_irqs(), for switching wakeup IRQs into a special wakeup mode and back from it and make