manage.c (e4da3fbfbd1de56d2367653e3823e6445e49f8a9) | manage.c (550acb19269d65f32e9ac4ddb26c2b2070e37f1c) |
---|---|
1/* 2 * linux/kernel/irq/manage.c 3 * 4 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar 5 * Copyright (C) 2005-2006 Thomas Gleixner 6 * 7 * This file contains driver APIs to the irq subsystem. 8 */ --- 609 unchanged lines hidden (view full) --- 618static irqreturn_t irq_nested_primary_handler(int irq, void *dev_id) 619{ 620 WARN(1, "Primary handler called for nested irq %d\n", irq); 621 return IRQ_NONE; 622} 623 624static int irq_wait_for_interrupt(struct irqaction *action) 625{ | 1/* 2 * linux/kernel/irq/manage.c 3 * 4 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar 5 * Copyright (C) 2005-2006 Thomas Gleixner 6 * 7 * This file contains driver APIs to the irq subsystem. 8 */ --- 609 unchanged lines hidden (view full) --- 618static irqreturn_t irq_nested_primary_handler(int irq, void *dev_id) 619{ 620 WARN(1, "Primary handler called for nested irq %d\n", irq); 621 return IRQ_NONE; 622} 623 624static int irq_wait_for_interrupt(struct irqaction *action) 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 if (test_and_clear_bit(IRQTF_RUNTHREAD, 630 &action->thread_flags)) { 631 __set_current_state(TASK_RUNNING); 632 return 0; 633 } 634 schedule(); | 629 630 if (test_and_clear_bit(IRQTF_RUNTHREAD, 631 &action->thread_flags)) { 632 __set_current_state(TASK_RUNNING); 633 return 0; 634 } 635 schedule(); |
636 set_current_state(TASK_INTERRUPTIBLE); |
|
635 } | 637 } |
638 __set_current_state(TASK_RUNNING); |
|
636 return -1; 637} 638 639/* 640 * Oneshot interrupts keep the irq line masked until the threaded 641 * handler finished. unmask if the interrupt has not been disabled and 642 * is marked MASKED. 643 */ --- 947 unchanged lines hidden (view full) --- 1591 !irq_settings_is_per_cpu_devid(desc)) 1592 return -EINVAL; 1593 1594 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); 1595 if (!action) 1596 return -ENOMEM; 1597 1598 action->handler = handler; | 639 return -1; 640} 641 642/* 643 * Oneshot interrupts keep the irq line masked until the threaded 644 * handler finished. unmask if the interrupt has not been disabled and 645 * is marked MASKED. 646 */ --- 947 unchanged lines hidden (view full) --- 1594 !irq_settings_is_per_cpu_devid(desc)) 1595 return -EINVAL; 1596 1597 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); 1598 if (!action) 1599 return -ENOMEM; 1600 1601 action->handler = handler; |
1599 action->flags = IRQF_PERCPU; | 1602 action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND; |
1600 action->name = devname; 1601 action->percpu_dev_id = dev_id; 1602 1603 chip_bus_lock(desc); 1604 retval = __setup_irq(irq, desc, action); 1605 chip_bus_sync_unlock(desc); 1606 1607 if (retval) 1608 kfree(action); 1609 1610 return retval; 1611} | 1603 action->name = devname; 1604 action->percpu_dev_id = dev_id; 1605 1606 chip_bus_lock(desc); 1607 retval = __setup_irq(irq, desc, action); 1608 chip_bus_sync_unlock(desc); 1609 1610 if (retval) 1611 kfree(action); 1612 1613 return retval; 1614} |