Lines Matching refs:action

164 	struct irqaction *action;  in irq_set_thread_affinity()  local
166 for_each_action_of_desc(desc, action) in irq_set_thread_affinity()
167 if (action->thread) in irq_set_thread_affinity()
168 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_set_thread_affinity()
686 if (!desc->action || in can_request_irq()
687 irqflags & desc->action->flags & IRQF_SHARED) in can_request_irq()
791 static int irq_wait_for_interrupt(struct irqaction *action) in irq_wait_for_interrupt() argument
799 &action->thread_flags)) { in irq_wait_for_interrupt()
808 &action->thread_flags)) { in irq_wait_for_interrupt()
822 struct irqaction *action) in irq_finalize_oneshot() argument
825 action->handler == irq_forced_secondary_handler) in irq_finalize_oneshot()
857 if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_finalize_oneshot()
860 desc->threads_oneshot &= ~action->thread_mask; in irq_finalize_oneshot()
876 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) in irq_thread_check_affinity() argument
881 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags)) in irq_thread_check_affinity()
889 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_thread_check_affinity()
914 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { } in irq_thread_check_affinity() argument
924 irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) in irq_forced_thread_fn() argument
929 ret = action->thread_fn(action->irq, action->dev_id); in irq_forced_thread_fn()
930 irq_finalize_oneshot(desc, action); in irq_forced_thread_fn()
941 struct irqaction *action) in irq_thread_fn() argument
945 ret = action->thread_fn(action->irq, action->dev_id); in irq_thread_fn()
946 irq_finalize_oneshot(desc, action); in irq_thread_fn()
960 struct irqaction *action; in irq_thread_dtor() local
965 action = kthread_data(tsk); in irq_thread_dtor()
968 tsk->comm, tsk->pid, action->irq); in irq_thread_dtor()
971 desc = irq_to_desc(action->irq); in irq_thread_dtor()
976 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_thread_dtor()
980 irq_finalize_oneshot(desc, action); in irq_thread_dtor()
983 static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) in irq_wake_secondary() argument
985 struct irqaction *secondary = action->secondary; in irq_wake_secondary()
1001 struct irqaction *action = data; in irq_thread() local
1002 struct irq_desc *desc = irq_to_desc(action->irq); in irq_thread()
1004 struct irqaction *action); in irq_thread()
1007 &action->thread_flags)) in irq_thread()
1015 irq_thread_check_affinity(desc, action); in irq_thread()
1017 while (!irq_wait_for_interrupt(action)) { in irq_thread()
1020 irq_thread_check_affinity(desc, action); in irq_thread()
1022 action_ret = handler_fn(desc, action); in irq_thread()
1026 irq_wake_secondary(desc, action); in irq_thread()
1050 struct irqaction *action; in irq_wake_thread() local
1057 for_each_action_of_desc(desc, action) { in irq_wake_thread()
1058 if (action->dev_id == dev_id) { in irq_wake_thread()
1059 if (action->thread) in irq_wake_thread()
1060 __irq_wake_thread(desc, action); in irq_wake_thread()
1273 if (!desc->action) { in __setup_irq()
1289 old_ptr = &desc->action; in __setup_irq()
1514 if (!desc->action) in __setup_irq()
1575 struct irqaction *action, **action_ptr; in __free_irq() local
1588 action_ptr = &desc->action; in __free_irq()
1590 action = *action_ptr; in __free_irq()
1592 if (!action) { in __free_irq()
1600 if (action->dev_id == dev_id) in __free_irq()
1602 action_ptr = &action->next; in __free_irq()
1606 *action_ptr = action->next; in __free_irq()
1608 irq_pm_remove_action(desc, action); in __free_irq()
1611 if (!desc->action) { in __free_irq()
1639 unregister_handler_proc(irq, action); in __free_irq()
1653 if (action->flags & IRQF_SHARED) { in __free_irq()
1655 action->handler(irq, dev_id); in __free_irq()
1666 if (action->thread) { in __free_irq()
1667 kthread_stop(action->thread); in __free_irq()
1668 put_task_struct(action->thread); in __free_irq()
1669 if (action->secondary && action->secondary->thread) { in __free_irq()
1670 kthread_stop(action->secondary->thread); in __free_irq()
1671 put_task_struct(action->secondary->thread); in __free_irq()
1676 if (!desc->action) { in __free_irq()
1691 kfree(action->secondary); in __free_irq()
1692 return action; in __free_irq()
1730 struct irqaction *action; in free_irq() local
1741 action = __free_irq(desc, dev_id); in free_irq()
1743 if (!action) in free_irq()
1746 devname = action->name; in free_irq()
1747 kfree(action); in free_irq()
1798 struct irqaction *action; in request_threaded_irq() local
1833 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_threaded_irq()
1834 if (!action) in request_threaded_irq()
1837 action->handler = handler; in request_threaded_irq()
1838 action->thread_fn = thread_fn; in request_threaded_irq()
1839 action->flags = irqflags; in request_threaded_irq()
1840 action->name = devname; in request_threaded_irq()
1841 action->dev_id = dev_id; in request_threaded_irq()
1845 kfree(action); in request_threaded_irq()
1849 retval = __setup_irq(irq, desc, action); in request_threaded_irq()
1853 kfree(action->secondary); in request_threaded_irq()
1854 kfree(action); in request_threaded_irq()
2000 struct irqaction *action; in __free_percpu_irq() local
2010 action = desc->action; in __free_percpu_irq()
2011 if (!action || action->percpu_dev_id != dev_id) { in __free_percpu_irq()
2023 desc->action = NULL; in __free_percpu_irq()
2027 unregister_handler_proc(irq, action); in __free_percpu_irq()
2031 return action; in __free_percpu_irq()
2126 struct irqaction *action; in __request_percpu_irq() local
2141 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in __request_percpu_irq()
2142 if (!action) in __request_percpu_irq()
2145 action->handler = handler; in __request_percpu_irq()
2146 action->flags = flags | IRQF_PERCPU | IRQF_NO_SUSPEND; in __request_percpu_irq()
2147 action->name = devname; in __request_percpu_irq()
2148 action->percpu_dev_id = dev_id; in __request_percpu_irq()
2152 kfree(action); in __request_percpu_irq()
2156 retval = __setup_irq(irq, desc, action); in __request_percpu_irq()
2160 kfree(action); in __request_percpu_irq()