Lines Matching refs:work_ctx
24 struct irq_sim_work_ctx *work_ctx; member
61 *state = test_bit(hwirq, irq_ctx->work_ctx->pending); in irq_sim_get_irqchip_state()
79 assign_bit(hwirq, irq_ctx->work_ctx->pending, state); in irq_sim_set_irqchip_state()
81 irq_work_queue(&irq_ctx->work_ctx->work); in irq_sim_set_irqchip_state()
102 struct irq_sim_work_ctx *work_ctx; in irq_sim_handle_irq() local
106 work_ctx = container_of(work, struct irq_sim_work_ctx, work); in irq_sim_handle_irq()
108 while (!bitmap_empty(work_ctx->pending, work_ctx->irq_count)) { in irq_sim_handle_irq()
109 offset = find_next_bit(work_ctx->pending, in irq_sim_handle_irq()
110 work_ctx->irq_count, offset); in irq_sim_handle_irq()
111 clear_bit(offset, work_ctx->pending); in irq_sim_handle_irq()
112 irqnum = irq_find_mapping(work_ctx->domain, offset); in irq_sim_handle_irq()
120 struct irq_sim_work_ctx *work_ctx = domain->host_data; in irq_sim_domain_map() local
131 irq_ctx->work_ctx = work_ctx; in irq_sim_domain_map()
167 struct irq_sim_work_ctx *work_ctx; in irq_domain_create_sim() local
169 work_ctx = kmalloc(sizeof(*work_ctx), GFP_KERNEL); in irq_domain_create_sim()
170 if (!work_ctx) in irq_domain_create_sim()
173 work_ctx->pending = bitmap_zalloc(num_irqs, GFP_KERNEL); in irq_domain_create_sim()
174 if (!work_ctx->pending) in irq_domain_create_sim()
177 work_ctx->domain = irq_domain_create_linear(fwnode, num_irqs, in irq_domain_create_sim()
179 work_ctx); in irq_domain_create_sim()
180 if (!work_ctx->domain) in irq_domain_create_sim()
183 work_ctx->irq_count = num_irqs; in irq_domain_create_sim()
184 work_ctx->work = IRQ_WORK_INIT_HARD(irq_sim_handle_irq); in irq_domain_create_sim()
186 return work_ctx->domain; in irq_domain_create_sim()
189 bitmap_free(work_ctx->pending); in irq_domain_create_sim()
191 kfree(work_ctx); in irq_domain_create_sim()
205 struct irq_sim_work_ctx *work_ctx = domain->host_data; in irq_domain_remove_sim() local
207 irq_work_sync(&work_ctx->work); in irq_domain_remove_sim()
208 bitmap_free(work_ctx->pending); in irq_domain_remove_sim()
209 kfree(work_ctx); in irq_domain_remove_sim()