Lines Matching refs:action
190 struct irqaction *action; in irq_set_thread_affinity() local
192 for_each_action_of_desc(desc, action) in irq_set_thread_affinity()
193 if (action->thread) in irq_set_thread_affinity()
194 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_set_thread_affinity()
931 if (!desc->action || in can_request_irq()
932 irqflags & desc->action->flags & IRQF_SHARED) in can_request_irq()
1037 static int irq_wait_for_interrupt(struct irqaction *action) in irq_wait_for_interrupt() argument
1045 &action->thread_flags)) { in irq_wait_for_interrupt()
1054 &action->thread_flags)) { in irq_wait_for_interrupt()
1068 struct irqaction *action) in irq_finalize_oneshot() argument
1071 action->handler == irq_forced_secondary_handler) in irq_finalize_oneshot()
1103 if (test_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_finalize_oneshot()
1106 desc->threads_oneshot &= ~action->thread_mask; in irq_finalize_oneshot()
1122 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) in irq_thread_check_affinity() argument
1127 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags)) in irq_thread_check_affinity()
1135 set_bit(IRQTF_AFFINITY, &action->thread_flags); in irq_thread_check_affinity()
1160 irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { } in irq_thread_check_affinity() argument
1170 irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) in irq_forced_thread_fn() argument
1177 ret = action->thread_fn(action->irq, action->dev_id); in irq_forced_thread_fn()
1181 irq_finalize_oneshot(desc, action); in irq_forced_thread_fn()
1194 struct irqaction *action) in irq_thread_fn() argument
1198 ret = action->thread_fn(action->irq, action->dev_id); in irq_thread_fn()
1202 irq_finalize_oneshot(desc, action); in irq_thread_fn()
1216 struct irqaction *action; in irq_thread_dtor() local
1221 action = kthread_data(tsk); in irq_thread_dtor()
1224 tsk->comm, tsk->pid, action->irq); in irq_thread_dtor()
1227 desc = irq_to_desc(action->irq); in irq_thread_dtor()
1232 if (test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)) in irq_thread_dtor()
1236 irq_finalize_oneshot(desc, action); in irq_thread_dtor()
1239 static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) in irq_wake_secondary() argument
1241 struct irqaction *secondary = action->secondary; in irq_wake_secondary()
1257 struct irqaction *action = data; in irq_thread() local
1258 struct irq_desc *desc = irq_to_desc(action->irq); in irq_thread()
1260 struct irqaction *action); in irq_thread()
1265 &action->thread_flags)) in irq_thread()
1273 irq_thread_check_affinity(desc, action); in irq_thread()
1275 while (!irq_wait_for_interrupt(action)) { in irq_thread()
1278 irq_thread_check_affinity(desc, action); in irq_thread()
1280 action_ret = handler_fn(desc, action); in irq_thread()
1282 irq_wake_secondary(desc, action); in irq_thread()
1306 struct irqaction *action; in irq_wake_thread() local
1313 for_each_action_of_desc(desc, action) { in irq_wake_thread()
1314 if (action->dev_id == dev_id) { in irq_wake_thread()
1315 if (action->thread) in irq_wake_thread()
1316 __irq_wake_thread(desc, action); in irq_wake_thread()
1555 if (!desc->action) { in __setup_irq()
1571 old_ptr = &desc->action; in __setup_irq()
1810 if (!desc->action) in __setup_irq()
1843 struct irqaction *action, **action_ptr; in __free_irq() local
1856 action_ptr = &desc->action; in __free_irq()
1858 action = *action_ptr; in __free_irq()
1860 if (!action) { in __free_irq()
1868 if (action->dev_id == dev_id) in __free_irq()
1870 action_ptr = &action->next; in __free_irq()
1874 *action_ptr = action->next; in __free_irq()
1876 irq_pm_remove_action(desc, action); in __free_irq()
1879 if (!desc->action) { in __free_irq()
1908 unregister_handler_proc(irq, action); in __free_irq()
1926 if (action->flags & IRQF_SHARED) { in __free_irq()
1928 action->handler(irq, dev_id); in __free_irq()
1939 if (action->thread) { in __free_irq()
1940 kthread_stop(action->thread); in __free_irq()
1941 put_task_struct(action->thread); in __free_irq()
1942 if (action->secondary && action->secondary->thread) { in __free_irq()
1943 kthread_stop(action->secondary->thread); in __free_irq()
1944 put_task_struct(action->secondary->thread); in __free_irq()
1949 if (!desc->action) { in __free_irq()
1972 kfree(action->secondary); in __free_irq()
1973 return action; in __free_irq()
1995 struct irqaction *action; in free_irq() local
2006 action = __free_irq(desc, dev_id); in free_irq()
2008 if (!action) in free_irq()
2011 devname = action->name; in free_irq()
2012 kfree(action); in free_irq()
2024 if (!WARN_ON(desc->action == NULL)) { in __cleanup_nmi()
2025 irq_pm_remove_action(desc, desc->action); in __cleanup_nmi()
2026 devname = desc->action->name; in __cleanup_nmi()
2027 unregister_handler_proc(irq, desc->action); in __cleanup_nmi()
2029 kfree(desc->action); in __cleanup_nmi()
2030 desc->action = NULL; in __cleanup_nmi()
2116 struct irqaction *action; in request_threaded_irq() local
2156 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_threaded_irq()
2157 if (!action) in request_threaded_irq()
2160 action->handler = handler; in request_threaded_irq()
2161 action->thread_fn = thread_fn; in request_threaded_irq()
2162 action->flags = irqflags; in request_threaded_irq()
2163 action->name = devname; in request_threaded_irq()
2164 action->dev_id = dev_id; in request_threaded_irq()
2168 kfree(action); in request_threaded_irq()
2172 retval = __setup_irq(irq, desc, action); in request_threaded_irq()
2176 kfree(action->secondary); in request_threaded_irq()
2177 kfree(action); in request_threaded_irq()
2273 struct irqaction *action; in request_nmi() local
2300 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_nmi()
2301 if (!action) in request_nmi()
2304 action->handler = handler; in request_nmi()
2305 action->flags = irqflags | IRQF_NO_THREAD | IRQF_NOBALANCING; in request_nmi()
2306 action->name = name; in request_nmi()
2307 action->dev_id = dev_id; in request_nmi()
2313 retval = __setup_irq(irq, desc, action); in request_nmi()
2335 kfree(action); in request_nmi()
2429 struct irqaction *action; in __free_percpu_irq() local
2439 action = desc->action; in __free_percpu_irq()
2440 if (!action || action->percpu_dev_id != dev_id) { in __free_percpu_irq()
2452 desc->action = NULL; in __free_percpu_irq()
2458 unregister_handler_proc(irq, action); in __free_percpu_irq()
2462 return action; in __free_percpu_irq()
2570 struct irqaction *action; in __request_percpu_irq() local
2585 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in __request_percpu_irq()
2586 if (!action) in __request_percpu_irq()
2589 action->handler = handler; in __request_percpu_irq()
2590 action->flags = flags | IRQF_PERCPU | IRQF_NO_SUSPEND; in __request_percpu_irq()
2591 action->name = devname; in __request_percpu_irq()
2592 action->percpu_dev_id = dev_id; in __request_percpu_irq()
2596 kfree(action); in __request_percpu_irq()
2600 retval = __setup_irq(irq, desc, action); in __request_percpu_irq()
2604 kfree(action); in __request_percpu_irq()
2635 struct irqaction *action; in request_percpu_nmi() local
2655 action = kzalloc(sizeof(struct irqaction), GFP_KERNEL); in request_percpu_nmi()
2656 if (!action) in request_percpu_nmi()
2659 action->handler = handler; in request_percpu_nmi()
2660 action->flags = IRQF_PERCPU | IRQF_NO_SUSPEND | IRQF_NO_THREAD in request_percpu_nmi()
2662 action->name = name; in request_percpu_nmi()
2663 action->percpu_dev_id = dev_id; in request_percpu_nmi()
2669 retval = __setup_irq(irq, desc, action); in request_percpu_nmi()
2682 kfree(action); in request_percpu_nmi()