Lines Matching full:irqs
96 * struct vmd_irq_list - list of driver requested IRQs mapping to a VMD vector
99 * @count: number of child IRQs assigned to this vector; used to track
117 struct vmd_irq_list *irqs; member
135 struct vmd_irq_list *irqs) in index_from_irqs() argument
137 return irqs - vmd->irqs; in index_from_irqs()
141 * Drivers managing a device in a VMD domain allocate their own IRQs as before,
226 return &vmd->irqs[vmd->first_vec]; in vmd_next_irq()
236 return &vmd->irqs[vmd->first_vec]; in vmd_next_irq()
242 if (vmd->irqs[i].count < vmd->irqs[best].count) in vmd_next_irq()
244 vmd->irqs[best].count++; in vmd_next_irq()
247 return &vmd->irqs[best]; in vmd_next_irq()
649 struct vmd_irq_list *irqs = data; in vmd_irq() local
653 idx = srcu_read_lock(&irqs->srcu); in vmd_irq()
654 list_for_each_entry_rcu(vmdirq, &irqs->irq_list, node) in vmd_irq()
656 srcu_read_unlock(&irqs->srcu, idx); in vmd_irq()
675 vmd->irqs = devm_kcalloc(&dev->dev, vmd->msix_count, sizeof(*vmd->irqs), in vmd_alloc_irqs()
677 if (!vmd->irqs) in vmd_alloc_irqs()
681 err = init_srcu_struct(&vmd->irqs[i].srcu); in vmd_alloc_irqs()
685 INIT_LIST_HEAD(&vmd->irqs[i].irq_list); in vmd_alloc_irqs()
686 vmd->irqs[i].virq = pci_irq_vector(dev, i); in vmd_alloc_irqs()
687 err = devm_request_irq(&dev->dev, vmd->irqs[i].virq, in vmd_alloc_irqs()
689 vmd->name, &vmd->irqs[i]); in vmd_alloc_irqs()
948 cleanup_srcu_struct(&vmd->irqs[i].srcu); in vmd_cleanup_srcu()
972 devm_free_irq(dev, vmd->irqs[i].virq, &vmd->irqs[i]); in vmd_suspend()
984 err = devm_request_irq(dev, vmd->irqs[i].virq, in vmd_resume()
986 vmd->name, &vmd->irqs[i]); in vmd_resume()