Lines Matching refs:msi

36 	struct xgene_msi	*msi;  member
103 static u32 xgene_msi_ir_read(struct xgene_msi *msi, in xgene_msi_ir_read() argument
106 return readl_relaxed(msi->msi_regs + MSI_IR0 + in xgene_msi_ir_read()
111 static u32 xgene_msi_int_read(struct xgene_msi *msi, u32 msi_grp) in xgene_msi_int_read() argument
113 return readl_relaxed(msi->msi_regs + MSI_INT0 + (msi_grp << 16)); in xgene_msi_int_read()
152 struct xgene_msi *msi = irq_data_get_irq_chip_data(data); in xgene_compose_msi_msg() local
155 u64 target_addr = msi->msi_addr + (((8 * group) + reg_set) << 16); in xgene_compose_msi_msg()
206 struct xgene_msi *msi = domain->host_data; in xgene_irq_domain_alloc() local
209 mutex_lock(&msi->bitmap_lock); in xgene_irq_domain_alloc()
211 msi_irq = bitmap_find_next_zero_area(msi->bitmap, NR_MSI_VEC, 0, in xgene_irq_domain_alloc()
212 msi->num_cpus, 0); in xgene_irq_domain_alloc()
214 bitmap_set(msi->bitmap, msi_irq, msi->num_cpus); in xgene_irq_domain_alloc()
218 mutex_unlock(&msi->bitmap_lock); in xgene_irq_domain_alloc()
234 struct xgene_msi *msi = irq_data_get_irq_chip_data(d); in xgene_irq_domain_free() local
237 mutex_lock(&msi->bitmap_lock); in xgene_irq_domain_free()
240 bitmap_clear(msi->bitmap, hwirq, msi->num_cpus); in xgene_irq_domain_free()
242 mutex_unlock(&msi->bitmap_lock); in xgene_irq_domain_free()
252 static int xgene_allocate_domains(struct xgene_msi *msi) in xgene_allocate_domains() argument
254 msi->inner_domain = irq_domain_add_linear(NULL, NR_MSI_VEC, in xgene_allocate_domains()
255 &msi_domain_ops, msi); in xgene_allocate_domains()
256 if (!msi->inner_domain) in xgene_allocate_domains()
259 msi->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(msi->node), in xgene_allocate_domains()
261 msi->inner_domain); in xgene_allocate_domains()
263 if (!msi->msi_domain) { in xgene_allocate_domains()
264 irq_domain_remove(msi->inner_domain); in xgene_allocate_domains()
271 static void xgene_free_domains(struct xgene_msi *msi) in xgene_free_domains() argument
273 if (msi->msi_domain) in xgene_free_domains()
274 irq_domain_remove(msi->msi_domain); in xgene_free_domains()
275 if (msi->inner_domain) in xgene_free_domains()
276 irq_domain_remove(msi->inner_domain); in xgene_free_domains()
310 xgene_msi = msi_groups->msi; in xgene_msi_isr()
366 struct xgene_msi *msi = platform_get_drvdata(pdev); in xgene_msi_remove() local
369 virq = msi->msi_groups[i].gic_irq; in xgene_msi_remove()
373 kfree(msi->msi_groups); in xgene_msi_remove()
375 kfree(msi->bitmap); in xgene_msi_remove()
376 msi->bitmap = NULL; in xgene_msi_remove()
378 xgene_free_domains(msi); in xgene_msi_remove()
385 struct xgene_msi *msi = &xgene_msi_ctrl; in xgene_msi_hwirq_alloc() local
391 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_alloc()
392 msi_group = &msi->msi_groups[i]; in xgene_msi_hwirq_alloc()
432 struct xgene_msi *msi = &xgene_msi_ctrl; in xgene_msi_hwirq_free() local
436 for (i = cpu; i < NR_HW_IRQS; i += msi->num_cpus) { in xgene_msi_hwirq_free()
437 msi_group = &msi->msi_groups[i]; in xgene_msi_hwirq_free()
522 xgene_msi->msi_groups[irq_index].msi = xgene_msi; in xgene_msi_probe()