Lines Matching refs:desc
32 struct msi_desc *desc; in alloc_msi_entry() local
34 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in alloc_msi_entry()
35 if (!desc) in alloc_msi_entry()
38 INIT_LIST_HEAD(&desc->list); in alloc_msi_entry()
39 desc->dev = dev; in alloc_msi_entry()
40 desc->nvec_used = nvec; in alloc_msi_entry()
42 desc->affinity = kmemdup(affinity, in alloc_msi_entry()
43 nvec * sizeof(*desc->affinity), GFP_KERNEL); in alloc_msi_entry()
44 if (!desc->affinity) { in alloc_msi_entry()
45 kfree(desc); in alloc_msi_entry()
50 return desc; in alloc_msi_entry()
205 struct msi_desc *desc) in msi_domain_ops_set_desc() argument
207 arg->desc = desc; in msi_domain_ops_set_desc()
320 struct msi_desc *desc; in msi_domain_populate_irqs() local
323 for_each_msi_entry(desc, dev) { in msi_domain_populate_irqs()
325 if (WARN_ON(!desc->irq || desc->nvec_used != 1)) { in msi_domain_populate_irqs()
330 if (!(desc->irq >= virq && desc->irq < (virq + nvec))) in msi_domain_populate_irqs()
333 ops->set_desc(arg, desc); in msi_domain_populate_irqs()
335 ret = irq_domain_alloc_irqs_hierarchy(domain, desc->irq, 1, in msi_domain_populate_irqs()
340 irq_set_msi_desc_off(desc->irq, 0, desc); in msi_domain_populate_irqs()
345 for_each_msi_entry(desc, dev) { in msi_domain_populate_irqs()
346 if (!(desc->irq >= virq && desc->irq < (virq + nvec))) in msi_domain_populate_irqs()
349 irq_domain_free_irqs_common(domain, desc->irq, 1); in msi_domain_populate_irqs()
371 struct msi_desc *desc; in msi_check_reservation_mode() local
386 desc = first_msi_entry(dev); in msi_check_reservation_mode()
387 return desc->msi_attrib.is_msix || desc->msi_attrib.maskbit; in msi_check_reservation_mode()
405 struct msi_desc *desc; in msi_domain_alloc_irqs() local
414 for_each_msi_entry(desc, dev) { in msi_domain_alloc_irqs()
415 ops->set_desc(&arg, desc); in msi_domain_alloc_irqs()
417 virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used, in msi_domain_alloc_irqs()
419 desc->affinity); in msi_domain_alloc_irqs()
423 ret = ops->handle_error(domain, desc, ret); in msi_domain_alloc_irqs()
429 for (i = 0; i < desc->nvec_used; i++) { in msi_domain_alloc_irqs()
430 irq_set_msi_desc_off(virq, i, desc); in msi_domain_alloc_irqs()
440 for_each_msi_entry(desc, dev) { in msi_domain_alloc_irqs()
441 virq = desc->irq; in msi_domain_alloc_irqs()
442 if (desc->nvec_used == 1) in msi_domain_alloc_irqs()
446 virq, virq + desc->nvec_used - 1); in msi_domain_alloc_irqs()
455 irq_data = irq_domain_get_irq_data(domain, desc->irq); in msi_domain_alloc_irqs()
468 for_each_msi_entry(desc, dev) { in msi_domain_alloc_irqs()
469 irq_data = irq_domain_get_irq_data(domain, desc->irq); in msi_domain_alloc_irqs()
476 for_each_msi_entry(desc, dev) { in msi_domain_alloc_irqs()
479 if (desc->irq == virq) in msi_domain_alloc_irqs()
482 irqd = irq_domain_get_irq_data(domain, desc->irq); in msi_domain_alloc_irqs()
498 struct msi_desc *desc; in msi_domain_free_irqs() local
500 for_each_msi_entry(desc, dev) { in msi_domain_free_irqs()
506 if (desc->irq) { in msi_domain_free_irqs()
507 irq_domain_free_irqs(desc->irq, desc->nvec_used); in msi_domain_free_irqs()
508 desc->irq = 0; in msi_domain_free_irqs()