linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] genirq: mixing IRQF_NO_SUSPEND and wakeup sources on shared IRQs
@ 2015-02-24  9:55 Boris Brezillon
  2015-02-24  9:56 ` [RFC PATCH 1/3] genirq: prevent system wakeup when dealing with IRQF_NO_SUSPEND IRQs Boris Brezillon
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Boris Brezillon @ 2015-02-24  9:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I put the IRQF_NO_SUSPEND_SAFE/IRQF_TIMER_SIBLING_OK/WHATEVER_NAME_YOU_CHOOSE
debate aside to concentrate on another problem pointed out by Rafael and
Mark: the fact that we cannot mix IRQF_NO_SUSPEND and wakeup sources on
a shared IRQ line.

This is because the wakeup code is prevailing the IRQF_NO_SUSPEND case
and will trigger a system wakeup as soon as the IRQ line is tagged as a
wakeup source.

This series propose an approach to deal with such cases by doing the
following:
1/ Prevent any system wakeup when at least one of the IRQ user has set
   the IRQF_NO_SUSPEND flag
2/ Adapt IRQ handlers so that they can safely be called in suspended
   state
3/ Let drivers decide when the system should be woken up

Let me know what you think of this approach.

Thanks,

Boris

Boris Brezillon (3):
  genirq: prevent system wakeup when dealing with IRQF_NO_SUSPEND IRQs
  genirq: add helper functions to deal with wakeup on shared
    IRQF_NO_SUSPEND IRQs
  rtc: at91sam9: properly act when IRQ handler is called in suspended
    state

 drivers/rtc/rtc-at91sam9.c | 62 ++++++++++++++++++++++++++++++++++++++--------
 include/linux/interrupt.h  |  3 +++
 kernel/irq/manage.c        | 16 ++++++++++++
 kernel/irq/pm.c            |  9 ++++++-
 4 files changed, 78 insertions(+), 12 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2015-03-06  0:54 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24  9:55 [RFC PATCH 0/3] genirq: mixing IRQF_NO_SUSPEND and wakeup sources on shared IRQs Boris Brezillon
2015-02-24  9:56 ` [RFC PATCH 1/3] genirq: prevent system wakeup when dealing with IRQF_NO_SUSPEND IRQs Boris Brezillon
2015-02-25 22:01   ` Rafael J. Wysocki
2015-02-26  8:06     ` Boris Brezillon
2015-02-24  9:56 ` [RFC PATCH 2/3] genirq: add helper functions to deal with wakeup on shared " Boris Brezillon
2015-02-25 22:03   ` Rafael J. Wysocki
2015-02-26  8:09     ` Boris Brezillon
2015-02-24  9:56 ` [RFC PATCH 3/3] rtc: at91sam9: properly act when IRQ handler is called in suspended state Boris Brezillon
2015-02-25 22:05   ` Rafael J. Wysocki
2015-02-26  8:12     ` Boris Brezillon
2015-02-25 21:59 ` [RFC PATCH 0/3] genirq: mixing IRQF_NO_SUSPEND and wakeup sources on shared IRQs Rafael J. Wysocki
2015-02-26  8:03   ` Boris Brezillon
2015-02-26 15:44     ` Rafael J. Wysocki
2015-02-26 15:47       ` Boris Brezillon
2015-02-26 18:17         ` Rafael J. Wysocki
2015-02-26 18:17           ` Boris Brezillon
2015-02-26 21:55             ` Rafael J. Wysocki
2015-02-26 23:07             ` [PATCH] genirq / PM: Add flag for shared NO_SUSPEND interrupt lines Rafael J. Wysocki
2015-02-27  8:38               ` Peter Zijlstra
2015-02-27 22:13                 ` Rafael J. Wysocki
2015-02-27 22:11                   ` Peter Zijlstra
2015-03-04 19:42               ` Mark Rutland
2015-03-04 20:00                 ` [PATCH] genirq: describe IRQF_COND_SUSPEND Mark Rutland
2015-03-04 21:55                   ` Rafael J. Wysocki
2015-03-04 22:17                   ` Alexandre Belloni
2015-03-04 22:27                     ` Arnd Bergmann
2015-03-05 11:04                     ` Mark Rutland
2015-03-05 11:33                       ` Alexandre Belloni
2015-03-05 12:07                         ` Mark Rutland
2015-03-06  0:54                       ` Rafael J. Wysocki
2015-03-04 21:30                 ` [PATCH] genirq / PM: Add flag for shared NO_SUSPEND interrupt lines Rafael J. Wysocki

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).