Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234776
b: refs/heads/master
c: d209a69
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Mar 12, 2011
1 parent b5bac27 commit 2b9e883
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9936bb3952a08d701f7b03f8f62d158f94d8085
refs/heads/master: d209a699a0b975ad47f399d70ddc3791f1b84496
2 changes: 2 additions & 0 deletions trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,12 @@ struct irq_chip {
*
* IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type()
* IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled
* IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path
*/
enum {
IRQCHIP_SET_TYPE_MASKED = (1 << 0),
IRQCHIP_EOI_IF_HANDLED = (1 << 1),
IRQCHIP_MASK_ON_SUSPEND = (1 << 2),
};

/* This include will go away once we isolated irq_desc usage to core code */
Expand Down
22 changes: 18 additions & 4 deletions trunk/kernel/irq/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,24 @@ int check_wakeup_irqs(void)
struct irq_desc *desc;
int irq;

for_each_irq_desc(irq, desc)
if (irqd_is_wakeup_set(&desc->irq_data) &&
(desc->istate & IRQS_PENDING))
return -EBUSY;
for_each_irq_desc(irq, desc) {
if (irqd_is_wakeup_set(&desc->irq_data)) {
if (desc->istate & IRQS_PENDING)
return -EBUSY;
continue;
}
/*
* Check the non wakeup interrupts whether they need
* to be masked before finally going into suspend
* state. That's for hardware which has no wakeup
* source configuration facility. The chip
* implementation indicates that with
* IRQCHIP_MASK_ON_SUSPEND.
*/
if (desc->istate & IRQS_SUSPENDED &&
irq_desc_get_chip(desc)->flags & IRQCHIP_MASK_ON_SUSPEND)
mask_irq(desc);
}

return 0;
}

0 comments on commit 2b9e883

Please sign in to comment.