Lines Matching full:gic

630 	struct gdma_irq_context *gic;  in mana_gd_register_irq()  local
650 gic = xa_load(&gc->irq_contexts, msi_index); in mana_gd_register_irq()
651 if (WARN_ON(!gic)) in mana_gd_register_irq()
654 spin_lock_irqsave(&gic->lock, flags); in mana_gd_register_irq()
655 list_add_rcu(&queue->entry, &gic->eq_list); in mana_gd_register_irq()
656 spin_unlock_irqrestore(&gic->lock, flags); in mana_gd_register_irq()
664 struct gdma_irq_context *gic; in mana_gd_deregister_irq() local
677 gic = xa_load(&gc->irq_contexts, msix_index); in mana_gd_deregister_irq()
678 if (WARN_ON(!gic)) in mana_gd_deregister_irq()
681 spin_lock_irqsave(&gic->lock, flags); in mana_gd_deregister_irq()
682 list_for_each_entry_rcu(eq, &gic->eq_list, entry) { in mana_gd_deregister_irq()
688 spin_unlock_irqrestore(&gic->lock, flags); in mana_gd_deregister_irq()
1431 struct gdma_irq_context *gic = arg; in mana_gd_intr() local
1432 struct list_head *eq_list = &gic->eq_list; in mana_gd_intr()
1437 gic->handler(eq); in mana_gd_intr()
1544 struct gdma_irq_context *gic; in mana_gd_setup_dyn_irqs() local
1559 gic = kzalloc(sizeof(*gic), GFP_KERNEL); in mana_gd_setup_dyn_irqs()
1560 if (!gic) { in mana_gd_setup_dyn_irqs()
1564 gic->handler = mana_gd_process_eq_events; in mana_gd_setup_dyn_irqs()
1565 INIT_LIST_HEAD(&gic->eq_list); in mana_gd_setup_dyn_irqs()
1566 spin_lock_init(&gic->lock); in mana_gd_setup_dyn_irqs()
1568 snprintf(gic->name, MANA_IRQ_NAME_SZ, "mana_q%d@pci:%s", in mana_gd_setup_dyn_irqs()
1578 err = request_irq(irqs[i - 1], mana_gd_intr, 0, gic->name, gic); in mana_gd_setup_dyn_irqs()
1582 xa_store(&gc->irq_contexts, i, gic, GFP_KERNEL); in mana_gd_setup_dyn_irqs()
1605 kfree(gic); in mana_gd_setup_dyn_irqs()
1609 gic = xa_load(&gc->irq_contexts, i); in mana_gd_setup_dyn_irqs()
1610 if (WARN_ON(!gic)) in mana_gd_setup_dyn_irqs()
1614 free_irq(irq, gic); in mana_gd_setup_dyn_irqs()
1616 kfree(gic); in mana_gd_setup_dyn_irqs()
1625 struct gdma_irq_context *gic; in mana_gd_setup_irqs() local
1637 gic = kzalloc(sizeof(*gic), GFP_KERNEL); in mana_gd_setup_irqs()
1638 if (!gic) { in mana_gd_setup_irqs()
1643 gic->handler = mana_gd_process_eq_events; in mana_gd_setup_irqs()
1644 INIT_LIST_HEAD(&gic->eq_list); in mana_gd_setup_irqs()
1645 spin_lock_init(&gic->lock); in mana_gd_setup_irqs()
1648 snprintf(gic->name, MANA_IRQ_NAME_SZ, "mana_hwc@pci:%s", in mana_gd_setup_irqs()
1651 snprintf(gic->name, MANA_IRQ_NAME_SZ, "mana_q%d@pci:%s", in mana_gd_setup_irqs()
1660 err = request_irq(irqs[i], mana_gd_intr, 0, gic->name, gic); in mana_gd_setup_irqs()
1664 xa_store(&gc->irq_contexts, i, gic, GFP_KERNEL); in mana_gd_setup_irqs()
1694 kfree(gic); in mana_gd_setup_irqs()
1698 gic = xa_load(&gc->irq_contexts, i); in mana_gd_setup_irqs()
1699 if (WARN_ON(!gic)) in mana_gd_setup_irqs()
1703 free_irq(irq, gic); in mana_gd_setup_irqs()
1705 kfree(gic); in mana_gd_setup_irqs()
1779 struct gdma_irq_context *gic; in mana_gd_remove_irqs() local
1790 gic = xa_load(&gc->irq_contexts, i); in mana_gd_remove_irqs()
1791 if (WARN_ON(!gic)) in mana_gd_remove_irqs()
1796 free_irq(irq, gic); in mana_gd_remove_irqs()
1798 kfree(gic); in mana_gd_remove_irqs()