Lines Matching full:msi

13 #include <linux/msi.h>
33 struct plda_msi *msi = &port->msi; in plda_handle_msi() local
46 for_each_set_bit(bit, &status, msi->num_vectors) { in plda_handle_msi()
47 ret = generic_handle_domain_irq(msi->dev_domain, bit); in plda_handle_msi()
49 dev_err_ratelimited(dev, "bad MSI IRQ %d\n", in plda_handle_msi()
69 phys_addr_t addr = port->msi.vector_phy; in plda_compose_msi_msg()
75 dev_dbg(port->dev, "msi#%x address_hi %#x address_lo %#x\n", in plda_compose_msi_msg()
80 .name = "PLDA MSI",
91 struct plda_msi *msi = &port->msi; in plda_irq_msi_domain_alloc() local
94 mutex_lock(&msi->lock); in plda_irq_msi_domain_alloc()
95 bit = find_first_zero_bit(msi->used, msi->num_vectors); in plda_irq_msi_domain_alloc()
96 if (bit >= msi->num_vectors) { in plda_irq_msi_domain_alloc()
97 mutex_unlock(&msi->lock); in plda_irq_msi_domain_alloc()
101 set_bit(bit, msi->used); in plda_irq_msi_domain_alloc()
106 mutex_unlock(&msi->lock); in plda_irq_msi_domain_alloc()
117 struct plda_msi *msi = &port->msi; in plda_irq_msi_domain_free() local
119 mutex_lock(&msi->lock); in plda_irq_msi_domain_free()
121 if (test_bit(d->hwirq, msi->used)) in plda_irq_msi_domain_free()
122 __clear_bit(d->hwirq, msi->used); in plda_irq_msi_domain_free()
124 dev_err(port->dev, "trying to free unused MSI%lu\n", d->hwirq); in plda_irq_msi_domain_free()
126 mutex_unlock(&msi->lock); in plda_irq_msi_domain_free()
135 .name = "PLDA PCIe MSI",
151 struct plda_msi *msi = &port->msi; in plda_allocate_msi_domains() local
153 mutex_init(&port->msi.lock); in plda_allocate_msi_domains()
155 msi->dev_domain = irq_domain_add_linear(NULL, msi->num_vectors, in plda_allocate_msi_domains()
157 if (!msi->dev_domain) { in plda_allocate_msi_domains()
162 msi->msi_domain = pci_msi_create_irq_domain(fwnode, in plda_allocate_msi_domains()
164 msi->dev_domain); in plda_allocate_msi_domains()
165 if (!msi->msi_domain) { in plda_allocate_msi_domains()
166 dev_err(dev, "failed to create MSI domain\n"); in plda_allocate_msi_domains()
167 irq_domain_remove(msi->dev_domain); in plda_allocate_msi_domains()
266 /* MSI event and sys events */ in plda_get_events()
480 /* Plug the MSI chained handler */ in plda_init_interrupts()
557 irq_domain_remove(pcie->msi.msi_domain); in plda_pcie_irq_domain_deinit()
558 irq_domain_remove(pcie->msi.dev_domain); in plda_pcie_irq_domain_deinit()
607 plda_set_default_msi(&port->msi); in plda_pcie_host_init()