Lines Matching +full:pci +full:- +full:domain
1 /* SPDX-License-Identifier: GPL-2.0 */
8 * - Interrupt core code
9 * - PCI/MSI core code
10 * - MSI interrupt domain implementations
11 * - IOMMU, low level VFIO, NTB and other justified exceptions
52 * msi_msg - Representation of a MSI message
95 * pci_msi_desc - PCI/MSI specific MSI descriptor data
97 * @msi_mask: [PCI MSI] MSI cached mask bits
98 * @msix_ctrl: [PCI MSI-X] MSI-X cached per vector control bits
99 * @is_msix: [PCI MSI/X] True if MSI-X
100 * @multiple: [PCI MSI/X] log2 num of messages allocated
101 * @multi_cap: [PCI MSI/X] log2 num of messages supported
102 * @can_mask: [PCI MSI/X] Masking supported?
103 * @is_64: [PCI MSI/X] Address size: 0=32bit 1=64bit
104 * @default_irq:[PCI MSI/X] The default pre-assigned non-MSI irq
105 * @mask_pos: [PCI MSI] Mask register position
106 * @mask_base: [PCI MSI-X] Mask register base address
129 * union msi_domain_cookie - Opaque MSI domain specific data
131 * @ptr: Pointer to domain specific data
132 * @iobase: Domain specific IOmem pointer
135 * domain to store domain specific information which is requried for
145 * struct msi_desc_data - Generic MSI descriptor data
146 * @dcookie: Cookie for MSI domain specific data which is required
151 * The content of this data is implementation defined, e.g. PCI/IMS
163 * struct msi_desc - Descriptor structure for MSI based interrupts
176 * @pci: PCI specific msi descriptor data
198 struct pci_msi_desc pci; member
217 * struct msi_dev_domain - The internals of MSI domain info per device
219 * @irqdomain: Pointer to a per device interrupt domain
223 struct irq_domain *domain; member
235 * msi_first_desc - Get the first MSI descriptor of the default irqdomain
255 * msi_domain_for_each_desc - Iterate the MSI descriptors in a specific domain
258 * @dev: struct device pointer - device to iterate
259 * @domid: The id of the interrupt domain which should be walked.
263 * - The loop must be protected with a msi_lock_descs()/msi_unlock_descs()
265 * - It is safe to remove a retrieved MSI descriptor in the loop.
272 * msi_for_each_desc - Iterate the MSI descriptors in the default irqdomain
275 * @dev: struct device pointer - device to iterate
279 * - The loop must be protected with a msi_lock_descs()/msi_unlock_descs()
281 * - It is safe to remove a retrieved MSI descriptor in the loop.
286 #define msi_desc_to_dev(desc) ((desc)->dev)
291 return desc->iommu_cookie; in msi_desc_get_iommu_cookie()
297 desc->iommu_cookie = iommu_cookie; in msi_desc_set_iommu_cookie()
314 * msi_insert_msi_desc - Allocate and initialize a MSI descriptor in the
315 * default irqdomain and insert it at @init_desc->msi_index
330 * msi_free_msi_descs_range - Free a range of MSI descriptors of a device
344 * msi_free_msi_descs - Free all MSI descriptors of a device in the default irqdomain
368 * Xen uses non-default msi_domain_ops and hence needs a way to populate sysfs
382 * The restore hook is still available even for fully irq domain based
400 * struct msi_domain_ops - MSI interrupt domain callbacks
402 * @msi_init: Domain specific init function for MSI interrupts
403 * @msi_free: Domain specific function to free a MSI interrupts
404 * @msi_prepare: Prepare the allocation of the interrupts in the domain
406 * in the domain
433 int (*msi_init)(struct irq_domain *domain,
437 void (*msi_free)(struct irq_domain *domain,
440 int (*msi_prepare)(struct irq_domain *domain,
443 void (*prepare_desc)(struct irq_domain *domain, msi_alloc_info_t *arg,
447 int (*domain_alloc_irqs)(struct irq_domain *domain,
449 void (*domain_free_irqs)(struct irq_domain *domain,
451 void (*msi_post_free)(struct irq_domain *domain,
453 int (*msi_translate)(struct irq_domain *domain, struct irq_fwspec *fwspec,
458 * struct msi_domain_info - MSI interrupt domain data
460 * @bus_token: The domain bus token
464 * by the domain creation code.
471 * @data: Optional: domain specific data
487 * struct msi_domain_template - Template for MSI device domains
489 * @chip: Interrupt chip for this domain
490 * @ops: MSI domain ops
491 * @info: MSI domain info data
503 * Bit 0-15: Generic MSI functionality which is not subject to restriction
506 * Bit 16-31: Functionality which depends on the underlying parent domain and
508 * a device MSI domain is initialized.
512 * Init non implemented ops callbacks with default MSI domain
521 /* Needs early activate, required for PCI */
534 /* Use dev->fwnode for MSI device domain creation */
536 /* Set parent->dev into domain->pm_dev on device domain creation */
544 /* Mask for the domain specific functionality */
547 /* Support multiple PCI MSI interrupts */
549 /* Support PCI MSIX interrupts */
551 /* Is level-triggered capable, using two messages */
553 /* MSI-X entries must be contiguous */
555 /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */
557 /* PCI MSIs cannot be steered separately to CPU cores */
562 * struct msi_parent_ops - MSI parent domain callbacks and configuration info
564 * @supported_flags: Required: The supported MSI flags of the parent domain
565 * @required_flags: Optional: The required MSI flags of the parent MSI domain
566 * @bus_select_token: Optional: The bus token of the real parent domain for
570 * @prefix: Optional: Prefix for the domain and chip name
572 * domain specific domain flags, domain ops and interrupt chip
573 * callbacks when a per device domain is created.
581 bool (*init_dev_msi_info)(struct device *dev, struct irq_domain *domain,
586 bool msi_parent_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
623 struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain);
634 return msi_domain_alloc_irqs_range(dev, domid, 0, nirqs - 1); in msi_domain_alloc_irqs()
650 /* PCI specific interfaces */
661 u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev);