Lines Matching refs:msi
27 struct xgene_msi *msi; member
94 static u32 xgene_msi_ir_read(struct xgene_msi *msi, in xgene_msi_ir_read() argument
97 return readl_relaxed(msi->msi_regs + MSI_IR0 + in xgene_msi_ir_read()
102 static u32 xgene_msi_int_read(struct xgene_msi *msi, u32 msi_grp) in xgene_msi_int_read() argument
104 return readl_relaxed(msi->msi_regs + MSI_INT0 + (msi_grp << 16)); in xgene_msi_int_read()
143 struct xgene_msi *msi = irq_data_get_irq_chip_data(data); in xgene_compose_msi_msg() local
146 u64 target_addr = msi->msi_addr + (((8 * group) + reg_set) << 16); in xgene_compose_msi_msg()
197 struct xgene_msi *msi = domain->host_data; in xgene_irq_domain_alloc() local
200 mutex_lock(&msi->bitmap_lock); in xgene_irq_domain_alloc()
202 msi_irq = bitmap_find_next_zero_area(msi->bitmap, NR_MSI_VEC, 0, in xgene_irq_domain_alloc()
203 msi->num_cpus, 0); in xgene_irq_domain_alloc()
205 bitmap_set(msi->bitmap, msi_irq, msi->num_cpus); in xgene_irq_domain_alloc()
209 mutex_unlock(&msi->bitmap_lock); in xgene_irq_domain_alloc()
225 struct xgene_msi *msi = irq_data_get_irq_chip_data(d); in xgene_irq_domain_free() local
228 mutex_lock(&msi->bitmap_lock); in xgene_irq_domain_free()
231 bitmap_clear(msi->bitmap, hwirq, msi->num_cpus); in xgene_irq_domain_free()
233 mutex_unlock(&msi->bitmap_lock); in xgene_irq_domain_free()
243 static int xgene_allocate_domains(struct xgene_msi *msi) in xgene_allocate_domains() argument
245 msi->inner_domain = irq_domain_add_linear(NULL, NR_MSI_VEC, in xgene_allocate_domains()
246 &msi_domain_ops, msi); in xgene_allocate_domains()
247 if (!msi->inner_domain) in xgene_allocate_domains()
250 msi->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(msi->node), in xgene_allocate_domains()
252 msi->inner_domain); in xgene_allocate_domains()
254 if (!msi->msi_domain) { in xgene_allocate_domains()
255 irq_domain_remove(msi->inner_domain); in xgene_allocate_domains()
262 static void xgene_free_domains(struct xgene_msi *msi) in xgene_free_domains() argument
264 if (msi->msi_domain) in xgene_free_domains()
265 irq_domain_remove(msi->msi_domain); in xgene_free_domains()
266 if (msi->inner_domain) in xgene_free_domains()
267 irq_domain_remove(msi->inner_domain); in xgene_free_domains()
298 xgene_msi = msi_groups->msi; in xgene_msi_isr()
353 struct xgene_msi *msi = platform_get_drvdata(pdev); in xgene_msi_remove() local
359 kfree(msi->msi_groups); in xgene_msi_remove()
361 bitmap_free(msi->bitmap); in xgene_msi_remove()
362 msi->bitmap = NULL; in xgene_msi_remove()
364 xgene_free_domains(msi); in xgene_msi_remove()
369 struct xgene_msi *msi = &xgene_msi_ctrl; in xgene_msi_hwirq_alloc() local
375 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_alloc()
376 msi_group = &msi->msi_groups[i]; in xgene_msi_hwirq_alloc()
412 struct xgene_msi *msi = &xgene_msi_ctrl; in xgene_msi_hwirq_free() local
416 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_free()
417 msi_group = &msi->msi_groups[i]; in xgene_msi_hwirq_free()
473 xgene_msi->msi_groups[irq_index].msi = xgene_msi; in xgene_msi_probe()