diff options
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 67ce837ae52c..32313c084442 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -623,8 +623,9 @@ static irqreturn_t irq_nested_primary_handler(int irq, void *dev_id) | |||
623 | 623 | ||
624 | static int irq_wait_for_interrupt(struct irqaction *action) | 624 | static int irq_wait_for_interrupt(struct irqaction *action) |
625 | { | 625 | { |
626 | set_current_state(TASK_INTERRUPTIBLE); | ||
627 | |||
626 | while (!kthread_should_stop()) { | 628 | while (!kthread_should_stop()) { |
627 | set_current_state(TASK_INTERRUPTIBLE); | ||
628 | 629 | ||
629 | if (test_and_clear_bit(IRQTF_RUNTHREAD, | 630 | if (test_and_clear_bit(IRQTF_RUNTHREAD, |
630 | &action->thread_flags)) { | 631 | &action->thread_flags)) { |
@@ -632,7 +633,9 @@ static int irq_wait_for_interrupt(struct irqaction *action) | |||
632 | return 0; | 633 | return 0; |
633 | } | 634 | } |
634 | schedule(); | 635 | schedule(); |
636 | set_current_state(TASK_INTERRUPTIBLE); | ||
635 | } | 637 | } |
638 | __set_current_state(TASK_RUNNING); | ||
636 | return -1; | 639 | return -1; |
637 | } | 640 | } |
638 | 641 | ||
@@ -1024,7 +1027,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1024 | desc->istate |= IRQS_ONESHOT; | 1027 | desc->istate |= IRQS_ONESHOT; |
1025 | 1028 | ||
1026 | if (irq_settings_can_autoenable(desc)) | 1029 | if (irq_settings_can_autoenable(desc)) |
1027 | irq_startup(desc); | 1030 | irq_startup(desc, true); |
1028 | else | 1031 | else |
1029 | /* Undo nested disables: */ | 1032 | /* Undo nested disables: */ |
1030 | desc->depth = 1; | 1033 | desc->depth = 1; |
@@ -1289,7 +1292,7 @@ EXPORT_SYMBOL(free_irq); | |||
1289 | * and to set up the interrupt handler in the right order. | 1292 | * and to set up the interrupt handler in the right order. |
1290 | * | 1293 | * |
1291 | * If you want to set up a threaded irq handler for your device | 1294 | * If you want to set up a threaded irq handler for your device |
1292 | * then you need to supply @handler and @thread_fn. @handler ist | 1295 | * then you need to supply @handler and @thread_fn. @handler is |
1293 | * still called in hard interrupt context and has to check | 1296 | * still called in hard interrupt context and has to check |
1294 | * whether the interrupt originates from the device. If yes it | 1297 | * whether the interrupt originates from the device. If yes it |
1295 | * needs to disable the interrupt on the device and return | 1298 | * needs to disable the interrupt on the device and return |
@@ -1596,7 +1599,7 @@ int request_percpu_irq(unsigned int irq, irq_handler_t handler, | |||
1596 | return -ENOMEM; | 1599 | return -ENOMEM; |
1597 | 1600 | ||
1598 | action->handler = handler; | 1601 | action->handler = handler; |
1599 | action->flags = IRQF_PERCPU; | 1602 | action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND; |
1600 | action->name = devname; | 1603 | action->name = devname; |
1601 | action->percpu_dev_id = dev_id; | 1604 | action->percpu_dev_id = dev_id; |
1602 | 1605 | ||