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 if (action->secondary && action->secondary->thread) in irq_set_thread_affinity()
198 set_bit(IRQTF_AFFINITY, &action->secondary->thread_flags); in irq_set_thread_affinity()
950 if (!desc->action || in can_request_irq()
951 irqflags & desc->action->flags & IRQF_SHARED) in can_request_irq()
1056 static int irq_wait_for_interrupt(struct irqaction *action) in irq_wait_for_interrupt() argument
1064 &action->thread_flags)) { in irq_wait_for_interrupt()
1073 &action->thread_flags)) { in irq_wait_for_interrupt()
1087 struct irqaction *action) in irq_finalize_oneshot() argument
1090 action->handler == irq_forced_secondary_handler) in irq_finalize_oneshot()
1122 if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_finalize_oneshot()
1125 desc->threads_oneshot &= ~action->thread_mask; in irq_finalize_oneshot()
1141 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) in irq_thread_check_affinity() argument
1146 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags)) in irq_thread_check_affinity()
1154 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_thread_check_affinity()
1179 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { } in irq_thread_check_affinity() argument
1189 irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) in irq_forced_thread_fn() argument
1196 ret = action->thread_fn(action->irq, action->dev_id); in irq_forced_thread_fn()
1200 irq_finalize_oneshot(desc, action); in irq_forced_thread_fn()
1213 struct irqaction *action) in irq_thread_fn() argument
1217 ret = action->thread_fn(action->irq, action->dev_id); in irq_thread_fn()
1221 irq_finalize_oneshot(desc, action); in irq_thread_fn()
1235 struct irqaction *action; in irq_thread_dtor() local
1240 action = kthread_data(tsk); in irq_thread_dtor()
1243 tsk->comm, tsk->pid, action->irq); in irq_thread_dtor()
1246 desc = irq_to_desc(action->irq); in irq_thread_dtor()
1251 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_thread_dtor()
1255 irq_finalize_oneshot(desc, action); in irq_thread_dtor()
1258 static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) in irq_wake_secondary() argument
1260 struct irqaction *secondary = action->secondary; in irq_wake_secondary()
1274 struct irqaction *action) in irq_thread_set_ready() argument
1276 set_bit(IRQTF_READY, &action->thread_flags); in irq_thread_set_ready()
1285 struct irqaction *action) in wake_up_and_wait_for_irq_thread_ready() argument
1287 if (!action || !action->thread) in wake_up_and_wait_for_irq_thread_ready()
1290 wake_up_process(action->thread); in wake_up_and_wait_for_irq_thread_ready()
1292 test_bit(IRQTF_READY, &action->thread_flags)); in wake_up_and_wait_for_irq_thread_ready()
1301 struct irqaction *action = data; in irq_thread() local
1302 struct irq_desc *desc = irq_to_desc(action->irq); in irq_thread()
1304 struct irqaction *action); in irq_thread()
1306 irq_thread_set_ready(desc, action); in irq_thread()
1311 &action->thread_flags)) in irq_thread()
1319 irq_thread_check_affinity(desc, action); in irq_thread()
1321 while (!irq_wait_for_interrupt(action)) { in irq_thread()
1324 irq_thread_check_affinity(desc, action); in irq_thread()
1326 action_ret = handler_fn(desc, action); in irq_thread()
1328 irq_wake_secondary(desc, action); in irq_thread()
1352 struct irqaction *action; in irq_wake_thread() local
1359 for_each_action_of_desc(desc, action) { in irq_wake_thread()
1360 if (action->dev_id == dev_id) { in irq_wake_thread()
1361 if (action->thread) in irq_wake_thread()
1362 __irq_wake_thread(desc, action); in irq_wake_thread()
1601 if (!desc->action) { in __setup_irq()
1617 old_ptr = &desc->action; in __setup_irq()
1848 if (!desc->action) in __setup_irq()
1879 struct irqaction *action, **action_ptr; in __free_irq() local
1892 action_ptr = &desc->action; in __free_irq()
1894 action = *action_ptr; in __free_irq()
1896 if (!action) { in __free_irq()
1904 if (action->dev_id == dev_id) in __free_irq()
1906 action_ptr = &action->next; in __free_irq()
1910 *action_ptr = action->next; in __free_irq()
1912 irq_pm_remove_action(desc, action); in __free_irq()
1915 if (!desc->action) { in __free_irq()
1944 unregister_handler_proc(irq, action); in __free_irq()
1962 if (action->flags & IRQF_SHARED) { in __free_irq()
1964 action->handler(irq, dev_id); in __free_irq()
1975 if (action->thread) { in __free_irq()
1976 kthread_stop_put(action->thread); in __free_irq()
1977 if (action->secondary && action->secondary->thread) in __free_irq()
1978 kthread_stop_put(action->secondary->thread); in __free_irq()
1982 if (!desc->action) { in __free_irq()
2005 kfree(action->secondary); in __free_irq()
2006 return action; in __free_irq()
2028 struct irqaction *action; in free_irq() local
2039 action = __free_irq(desc, dev_id); in free_irq()
2041 if (!action) in free_irq()
2044 devname = action->name; in free_irq()
2045 kfree(action); in free_irq()
2057 if (!WARN_ON(desc->action == NULL)) { in __cleanup_nmi()
2058 irq_pm_remove_action(desc, desc->action); in __cleanup_nmi()
2059 devname = desc->action->name; in __cleanup_nmi()
2060 unregister_handler_proc(irq, desc->action); in __cleanup_nmi()
2062 kfree(desc->action); in __cleanup_nmi()
2063 desc->action = NULL; in __cleanup_nmi()
2149 struct irqaction *action; in request_threaded_irq() local
2189 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_threaded_irq()
2190 if (!action) in request_threaded_irq()
2193 action->handler = handler; in request_threaded_irq()
2194 action->thread_fn = thread_fn; in request_threaded_irq()
2195 action->flags = irqflags; in request_threaded_irq()
2196 action->name = devname; in request_threaded_irq()
2197 action->dev_id = dev_id; in request_threaded_irq()
2201 kfree(action); in request_threaded_irq()
2205 retval = __setup_irq(irq, desc, action); in request_threaded_irq()
2209 kfree(action->secondary); in request_threaded_irq()
2210 kfree(action); in request_threaded_irq()
2306 struct irqaction *action; in request_nmi() local
2333 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_nmi()
2334 if (!action) in request_nmi()
2337 action->handler = handler; in request_nmi()
2338 action->flags = irqflags | IRQF_NO_THREAD | IRQF_NOBALANCING; in request_nmi()
2339 action->name = name; in request_nmi()
2340 action->dev_id = dev_id; in request_nmi()
2346 retval = __setup_irq(irq, desc, action); in request_nmi()
2368 kfree(action); in request_nmi()
2462 struct irqaction *action; in __free_percpu_irq() local
2472 action = desc->action; in __free_percpu_irq()
2473 if (!action || action->percpu_dev_id != dev_id) { in __free_percpu_irq()
2485 desc->action = NULL; in __free_percpu_irq()
2491 unregister_handler_proc(irq, action); in __free_percpu_irq()
2495 return action; in __free_percpu_irq()
2603 struct irqaction *action; in __request_percpu_irq() local
2618 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in __request_percpu_irq()
2619 if (!action) in __request_percpu_irq()
2622 action->handler = handler; in __request_percpu_irq()
2623 action->flags = flags | IRQF_PERCPU | IRQF_NO_SUSPEND; in __request_percpu_irq()
2624 action->name = devname; in __request_percpu_irq()
2625 action->percpu_dev_id = dev_id; in __request_percpu_irq()
2629 kfree(action); in __request_percpu_irq()
2633 retval = __setup_irq(irq, desc, action); in __request_percpu_irq()
2637 kfree(action); in __request_percpu_irq()
2668 struct irqaction *action; in request_percpu_nmi() local
2688 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_percpu_nmi()
2689 if (!action) in request_percpu_nmi()
2692 action->handler = handler; in request_percpu_nmi()
2693 action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND | IRQF_NO_THREAD in request_percpu_nmi()
2695 action->name = name; in request_percpu_nmi()
2696 action->percpu_dev_id = dev_id; in request_percpu_nmi()
2702 retval = __setup_irq(irq, desc, action); in request_percpu_nmi()
2715 kfree(action); in request_percpu_nmi()