Lines Matching refs:action

192 	struct irqaction *action;  in irq_set_thread_affinity()  local
194 for_each_action_of_desc(desc, action) { in irq_set_thread_affinity()
195 if (action->thread) { in irq_set_thread_affinity()
196 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_set_thread_affinity()
197 wake_up_process(action->thread); in irq_set_thread_affinity()
199 if (action->secondary && action->secondary->thread) { in irq_set_thread_affinity()
200 set_bit(IRQTF_AFFINITY, &action->secondary->thread_flags); in irq_set_thread_affinity()
201 wake_up_process(action->secondary->thread); in irq_set_thread_affinity()
951 if (!desc->action || in can_request_irq()
952 irqflags & desc->action->flags & IRQF_SHARED) in can_request_irq()
1061 static void irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) in irq_thread_check_affinity() argument
1066 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags)) in irq_thread_check_affinity()
1076 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_thread_check_affinity()
1099 static inline void irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { } in irq_thread_check_affinity() argument
1103 struct irqaction *action) in irq_wait_for_interrupt() argument
1107 irq_thread_check_affinity(desc, action); in irq_wait_for_interrupt()
1112 &action->thread_flags)) { in irq_wait_for_interrupt()
1121 &action->thread_flags)) { in irq_wait_for_interrupt()
1135 struct irqaction *action) in irq_finalize_oneshot() argument
1138 action->handler == irq_forced_secondary_handler) in irq_finalize_oneshot()
1170 if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_finalize_oneshot()
1173 desc->threads_oneshot &= ~action->thread_mask; in irq_finalize_oneshot()
1191 irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) in irq_forced_thread_fn() argument
1198 ret = action->thread_fn(action->irq, action->dev_id); in irq_forced_thread_fn()
1202 irq_finalize_oneshot(desc, action); in irq_forced_thread_fn()
1215 struct irqaction *action) in irq_thread_fn() argument
1219 ret = action->thread_fn(action->irq, action->dev_id); in irq_thread_fn()
1223 irq_finalize_oneshot(desc, action); in irq_thread_fn()
1237 struct irqaction *action; in irq_thread_dtor() local
1242 action = kthread_data(tsk); in irq_thread_dtor()
1245 tsk->comm, tsk->pid, action->irq); in irq_thread_dtor()
1248 desc = irq_to_desc(action->irq); in irq_thread_dtor()
1253 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_thread_dtor()
1257 irq_finalize_oneshot(desc, action); in irq_thread_dtor()
1260 static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) in irq_wake_secondary() argument
1262 struct irqaction *secondary = action->secondary; in irq_wake_secondary()
1276 struct irqaction *action) in irq_thread_set_ready() argument
1278 set_bit(IRQTF_READY, &action->thread_flags); in irq_thread_set_ready()
1287 struct irqaction *action) in wake_up_and_wait_for_irq_thread_ready() argument
1289 if (!action || !action->thread) in wake_up_and_wait_for_irq_thread_ready()
1292 wake_up_process(action->thread); in wake_up_and_wait_for_irq_thread_ready()
1294 test_bit(IRQTF_READY, &action->thread_flags)); in wake_up_and_wait_for_irq_thread_ready()
1303 struct irqaction *action = data; in irq_thread() local
1304 struct irq_desc *desc = irq_to_desc(action->irq); in irq_thread()
1306 struct irqaction *action); in irq_thread()
1308 irq_thread_set_ready(desc, action); in irq_thread()
1313 &action->thread_flags)) in irq_thread()
1321 while (!irq_wait_for_interrupt(desc, action)) { in irq_thread()
1324 action_ret = handler_fn(desc, action); in irq_thread()
1326 irq_wake_secondary(desc, action); in irq_thread()
1350 struct irqaction *action; in irq_wake_thread() local
1357 for_each_action_of_desc(desc, action) { in irq_wake_thread()
1358 if (action->dev_id == dev_id) { in irq_wake_thread()
1359 if (action->thread) in irq_wake_thread()
1360 __irq_wake_thread(desc, action); in irq_wake_thread()
1599 if (!desc->action) { in __setup_irq()
1615 old_ptr = &desc->action; in __setup_irq()
1851 if (!desc->action) in __setup_irq()
1882 struct irqaction *action, **action_ptr; in __free_irq() local
1895 action_ptr = &desc->action; in __free_irq()
1897 action = *action_ptr; in __free_irq()
1899 if (!action) { in __free_irq()
1907 if (action->dev_id == dev_id) in __free_irq()
1909 action_ptr = &action->next; in __free_irq()
1913 *action_ptr = action->next; in __free_irq()
1915 irq_pm_remove_action(desc, action); in __free_irq()
1918 if (!desc->action) { in __free_irq()
1947 unregister_handler_proc(irq, action); in __free_irq()
1965 if (action->flags & IRQF_SHARED) { in __free_irq()
1967 action->handler(irq, dev_id); in __free_irq()
1978 if (action->thread) { in __free_irq()
1979 kthread_stop_put(action->thread); in __free_irq()
1980 if (action->secondary && action->secondary->thread) in __free_irq()
1981 kthread_stop_put(action->secondary->thread); in __free_irq()
1985 if (!desc->action) { in __free_irq()
2008 kfree(action->secondary); in __free_irq()
2009 return action; in __free_irq()
2031 struct irqaction *action; in free_irq() local
2042 action = __free_irq(desc, dev_id); in free_irq()
2044 if (!action) in free_irq()
2047 devname = action->name; in free_irq()
2048 kfree(action); in free_irq()
2060 if (!WARN_ON(desc->action == NULL)) { in __cleanup_nmi()
2061 irq_pm_remove_action(desc, desc->action); in __cleanup_nmi()
2062 devname = desc->action->name; in __cleanup_nmi()
2063 unregister_handler_proc(irq, desc->action); in __cleanup_nmi()
2065 kfree(desc->action); in __cleanup_nmi()
2066 desc->action = NULL; in __cleanup_nmi()
2152 struct irqaction *action; in request_threaded_irq() local
2192 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_threaded_irq()
2193 if (!action) in request_threaded_irq()
2196 action->handler = handler; in request_threaded_irq()
2197 action->thread_fn = thread_fn; in request_threaded_irq()
2198 action->flags = irqflags; in request_threaded_irq()
2199 action->name = devname; in request_threaded_irq()
2200 action->dev_id = dev_id; in request_threaded_irq()
2204 kfree(action); in request_threaded_irq()
2208 retval = __setup_irq(irq, desc, action); in request_threaded_irq()
2212 kfree(action->secondary); in request_threaded_irq()
2213 kfree(action); in request_threaded_irq()
2309 struct irqaction *action; in request_nmi() local
2336 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_nmi()
2337 if (!action) in request_nmi()
2340 action->handler = handler; in request_nmi()
2341 action->flags = irqflags | IRQF_NO_THREAD | IRQF_NOBALANCING; in request_nmi()
2342 action->name = name; in request_nmi()
2343 action->dev_id = dev_id; in request_nmi()
2349 retval = __setup_irq(irq, desc, action); in request_nmi()
2371 kfree(action); in request_nmi()
2465 struct irqaction *action; in __free_percpu_irq() local
2475 action = desc->action; in __free_percpu_irq()
2476 if (!action || action->percpu_dev_id != dev_id) { in __free_percpu_irq()
2488 desc->action = NULL; in __free_percpu_irq()
2494 unregister_handler_proc(irq, action); in __free_percpu_irq()
2498 return action; in __free_percpu_irq()
2606 struct irqaction *action; in __request_percpu_irq() local
2621 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in __request_percpu_irq()
2622 if (!action) in __request_percpu_irq()
2625 action->handler = handler; in __request_percpu_irq()
2626 action->flags = flags | IRQF_PERCPU | IRQF_NO_SUSPEND; in __request_percpu_irq()
2627 action->name = devname; in __request_percpu_irq()
2628 action->percpu_dev_id = dev_id; in __request_percpu_irq()
2632 kfree(action); in __request_percpu_irq()
2636 retval = __setup_irq(irq, desc, action); in __request_percpu_irq()
2640 kfree(action); in __request_percpu_irq()
2671 struct irqaction *action; in request_percpu_nmi() local
2691 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_percpu_nmi()
2692 if (!action) in request_percpu_nmi()
2695 action->handler = handler; in request_percpu_nmi()
2696 action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND | IRQF_NO_THREAD in request_percpu_nmi()
2698 action->name = name; in request_percpu_nmi()
2699 action->percpu_dev_id = dev_id; in request_percpu_nmi()
2705 retval = __setup_irq(irq, desc, action); in request_percpu_nmi()
2718 kfree(action); in request_percpu_nmi()