Lines Matching refs:action
191 struct irqaction *action; in irq_set_thread_affinity() local
193 for_each_action_of_desc(desc, action) in irq_set_thread_affinity()
194 if (action->thread) in irq_set_thread_affinity()
195 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_set_thread_affinity()
847 if (!desc->action || in can_request_irq()
848 irqflags & desc->action->flags & IRQF_SHARED) in can_request_irq()
953 static int irq_wait_for_interrupt(struct irqaction *action) in irq_wait_for_interrupt() argument
961 &action->thread_flags)) { in irq_wait_for_interrupt()
970 &action->thread_flags)) { in irq_wait_for_interrupt()
984 struct irqaction *action) in irq_finalize_oneshot() argument
987 action->handler == irq_forced_secondary_handler) in irq_finalize_oneshot()
1019 if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_finalize_oneshot()
1022 desc->threads_oneshot &= ~action->thread_mask; in irq_finalize_oneshot()
1038 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) in irq_thread_check_affinity() argument
1043 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags)) in irq_thread_check_affinity()
1051 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_thread_check_affinity()
1076 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { } in irq_thread_check_affinity() argument
1086 irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) in irq_forced_thread_fn() argument
1093 ret = action->thread_fn(action->irq, action->dev_id); in irq_forced_thread_fn()
1097 irq_finalize_oneshot(desc, action); in irq_forced_thread_fn()
1110 struct irqaction *action) in irq_thread_fn() argument
1114 ret = action->thread_fn(action->irq, action->dev_id); in irq_thread_fn()
1118 irq_finalize_oneshot(desc, action); in irq_thread_fn()
1132 struct irqaction *action; in irq_thread_dtor() local
1137 action = kthread_data(tsk); in irq_thread_dtor()
1140 tsk->comm, tsk->pid, action->irq); in irq_thread_dtor()
1143 desc = irq_to_desc(action->irq); in irq_thread_dtor()
1148 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_thread_dtor()
1152 irq_finalize_oneshot(desc, action); in irq_thread_dtor()
1155 static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) in irq_wake_secondary() argument
1157 struct irqaction *secondary = action->secondary; in irq_wake_secondary()
1171 struct irqaction *action) in irq_thread_set_ready() argument
1173 set_bit(IRQTF_READY, &action->thread_flags); in irq_thread_set_ready()
1182 struct irqaction *action) in wake_up_and_wait_for_irq_thread_ready() argument
1184 if (!action || !action->thread) in wake_up_and_wait_for_irq_thread_ready()
1187 wake_up_process(action->thread); in wake_up_and_wait_for_irq_thread_ready()
1189 test_bit(IRQTF_READY, &action->thread_flags)); in wake_up_and_wait_for_irq_thread_ready()
1198 struct irqaction *action = data; in irq_thread() local
1199 struct irq_desc *desc = irq_to_desc(action->irq); in irq_thread()
1201 struct irqaction *action); in irq_thread()
1203 irq_thread_set_ready(desc, action); in irq_thread()
1206 &action->thread_flags)) in irq_thread()
1214 irq_thread_check_affinity(desc, action); in irq_thread()
1216 while (!irq_wait_for_interrupt(action)) { in irq_thread()
1219 irq_thread_check_affinity(desc, action); in irq_thread()
1221 action_ret = handler_fn(desc, action); in irq_thread()
1223 irq_wake_secondary(desc, action); in irq_thread()
1247 struct irqaction *action; in irq_wake_thread() local
1254 for_each_action_of_desc(desc, action) { in irq_wake_thread()
1255 if (action->dev_id == dev_id) { in irq_wake_thread()
1256 if (action->thread) in irq_wake_thread()
1257 __irq_wake_thread(desc, action); in irq_wake_thread()
1498 if (!desc->action) { in __setup_irq()
1514 old_ptr = &desc->action; in __setup_irq()
1740 if (!desc->action) in __setup_irq()
1773 struct irqaction *action, **action_ptr; in __free_irq() local
1786 action_ptr = &desc->action; in __free_irq()
1788 action = *action_ptr; in __free_irq()
1790 if (!action) { in __free_irq()
1798 if (action->dev_id == dev_id) in __free_irq()
1800 action_ptr = &action->next; in __free_irq()
1804 *action_ptr = action->next; in __free_irq()
1806 irq_pm_remove_action(desc, action); in __free_irq()
1809 if (!desc->action) { in __free_irq()
1838 unregister_handler_proc(irq, action); in __free_irq()
1856 if (action->flags & IRQF_SHARED) { in __free_irq()
1858 action->handler(irq, dev_id); in __free_irq()
1869 if (action->thread) { in __free_irq()
1870 kthread_stop(action->thread); in __free_irq()
1871 put_task_struct(action->thread); in __free_irq()
1872 if (action->secondary && action->secondary->thread) { in __free_irq()
1873 kthread_stop(action->secondary->thread); in __free_irq()
1874 put_task_struct(action->secondary->thread); in __free_irq()
1879 if (!desc->action) { in __free_irq()
1902 kfree(action->secondary); in __free_irq()
1903 return action; in __free_irq()
1925 struct irqaction *action; in free_irq() local
1936 action = __free_irq(desc, dev_id); in free_irq()
1938 if (!action) in free_irq()
1941 devname = action->name; in free_irq()
1942 kfree(action); in free_irq()
1954 if (!WARN_ON(desc->action == NULL)) { in __cleanup_nmi()
1955 irq_pm_remove_action(desc, desc->action); in __cleanup_nmi()
1956 devname = desc->action->name; in __cleanup_nmi()
1957 unregister_handler_proc(irq, desc->action); in __cleanup_nmi()
1959 kfree(desc->action); in __cleanup_nmi()
1960 desc->action = NULL; in __cleanup_nmi()
2046 struct irqaction *action; in request_threaded_irq() local
2086 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_threaded_irq()
2087 if (!action) in request_threaded_irq()
2090 action->handler = handler; in request_threaded_irq()
2091 action->thread_fn = thread_fn; in request_threaded_irq()
2092 action->flags = irqflags; in request_threaded_irq()
2093 action->name = devname; in request_threaded_irq()
2094 action->dev_id = dev_id; in request_threaded_irq()
2098 kfree(action); in request_threaded_irq()
2102 retval = __setup_irq(irq, desc, action); in request_threaded_irq()
2106 kfree(action->secondary); in request_threaded_irq()
2107 kfree(action); in request_threaded_irq()
2203 struct irqaction *action; in request_nmi() local
2230 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_nmi()
2231 if (!action) in request_nmi()
2234 action->handler = handler; in request_nmi()
2235 action->flags = irqflags | IRQF_NO_THREAD | IRQF_NOBALANCING; in request_nmi()
2236 action->name = name; in request_nmi()
2237 action->dev_id = dev_id; in request_nmi()
2243 retval = __setup_irq(irq, desc, action); in request_nmi()
2265 kfree(action); in request_nmi()
2359 struct irqaction *action; in __free_percpu_irq() local
2369 action = desc->action; in __free_percpu_irq()
2370 if (!action || action->percpu_dev_id != dev_id) { in __free_percpu_irq()
2382 desc->action = NULL; in __free_percpu_irq()
2388 unregister_handler_proc(irq, action); in __free_percpu_irq()
2392 return action; in __free_percpu_irq()
2500 struct irqaction *action; in __request_percpu_irq() local
2515 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in __request_percpu_irq()
2516 if (!action) in __request_percpu_irq()
2519 action->handler = handler; in __request_percpu_irq()
2520 action->flags = flags | IRQF_PERCPU | IRQF_NO_SUSPEND; in __request_percpu_irq()
2521 action->name = devname; in __request_percpu_irq()
2522 action->percpu_dev_id = dev_id; in __request_percpu_irq()
2526 kfree(action); in __request_percpu_irq()
2530 retval = __setup_irq(irq, desc, action); in __request_percpu_irq()
2534 kfree(action); in __request_percpu_irq()
2565 struct irqaction *action; in request_percpu_nmi() local
2585 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_percpu_nmi()
2586 if (!action) in request_percpu_nmi()
2589 action->handler = handler; in request_percpu_nmi()
2590 action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND | IRQF_NO_THREAD in request_percpu_nmi()
2592 action->name = name; in request_percpu_nmi()
2593 action->percpu_dev_id = dev_id; in request_percpu_nmi()
2599 retval = __setup_irq(irq, desc, action); in request_percpu_nmi()
2612 kfree(action); in request_percpu_nmi()