Lines Matching full:msi

6 #include <linux/msi.h>
19 * ntb_msi_init() - Initialize the MSI context
23 * It initializes the context for MSI operations and maps
46 struct_size = sizeof(*ntb->msi) + sizeof(*ntb->msi->peer_mws) * peers; in ntb_msi_init()
48 ntb->msi = devm_kzalloc(&ntb->dev, struct_size, GFP_KERNEL); in ntb_msi_init()
49 if (!ntb->msi) in ntb_msi_init()
52 ntb->msi->desc_changed = desc_changed; in ntb_msi_init()
62 ntb->msi->peer_mws[i] = devm_ioremap(&ntb->dev, mw_phys_addr, in ntb_msi_init()
64 if (!ntb->msi->peer_mws[i]) { in ntb_msi_init()
74 if (ntb->msi->peer_mws[i]) in ntb_msi_init()
75 devm_iounmap(&ntb->dev, ntb->msi->peer_mws[i]); in ntb_msi_init()
77 devm_kfree(&ntb->dev, ntb->msi); in ntb_msi_init()
78 ntb->msi = NULL; in ntb_msi_init()
84 * ntb_msi_setup_mws() - Initialize the MSI inbound memory windows
108 if (!ntb->msi) in ntb_msi_setup_mws()
150 ntb->msi->base_addr = addr; in ntb_msi_setup_mws()
151 ntb->msi->end_addr = addr + mw_min_size; in ntb_msi_setup_mws()
203 if (addr < ntb->msi->base_addr || addr >= ntb->msi->end_addr) { in ntb_msi_set_desc()
205 "IRQ %d: MSI Address not within the memory window (%llx, [%llx %llx])\n", in ntb_msi_set_desc()
206 entry->irq, addr, ntb->msi->base_addr, in ntb_msi_set_desc()
207 ntb->msi->end_addr); in ntb_msi_set_desc()
211 msi_desc->addr_offset = addr - ntb->msi->base_addr; in ntb_msi_set_desc()
223 if (dr->ntb->msi->desc_changed) in ntb_msi_write_msg()
224 dr->ntb->msi->desc_changed(dr->ntb->ctx); in ntb_msi_write_msg()
258 * ntbm_msi_request_threaded_irq() - allocate an MSI interrupt
267 * MSI interrupt and returns the descriptor used to trigger
288 if (!ntb->msi) in ntbm_msi_request_threaded_irq()
355 * @desc: MSI descriptor data which triggers the interrupt
368 if (!ntb->msi) in ntb_msi_peer_trigger()
371 idx = desc->addr_offset / sizeof(*ntb->msi->peer_mws[peer]); in ntb_msi_peer_trigger()
373 iowrite32(desc->data, &ntb->msi->peer_mws[peer][idx]); in ntb_msi_peer_trigger()
380 * ntb_msi_peer_addr() - Get the DMA address to trigger a peer's MSI interrupt
383 * @desc: MSI descriptor data which triggers the interrupt