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
56 * msi_msg - Representation of a MSI message
100 * pci_msi_desc - PCI/MSI specific MSI descriptor data
102 * @msi_mask: [PCI MSI] MSI cached mask bits
103 * @msix_ctrl: [PCI MSI-X] MSI-X cached per vector control bits
104 * @is_msix: [PCI MSI/X] True if MSI-X
105 * @multiple: [PCI MSI/X] log2 num of messages allocated
106 * @multi_cap: [PCI MSI/X] log2 num of messages supported
107 * @can_mask: [PCI MSI/X] Masking supported?
108 * @is_64: [PCI MSI/X] Address size: 0=32bit 1=64bit
109 * @default_irq:[PCI MSI/X] The default pre-assigned non-MSI irq
110 * @mask_pos: [PCI MSI] Mask register position
111 * @mask_base: [PCI MSI-X] Mask register base address
134 * union msi_domain_cookie - Opaque MSI domain specific data
136 * @ptr: Pointer to domain specific data
137 * @iobase: Domain specific IOmem pointer
140 * domain to store domain specific information which is requried for
150 * struct msi_desc_data - Generic MSI descriptor data
151 * @dcookie: Cookie for MSI domain specific data which is required
156 * The content of this data is implementation defined, e.g. PCI/IMS
168 * struct msi_desc - Descriptor structure for MSI based interrupts
181 * @pci: PCI specific msi descriptor data
203 struct pci_msi_desc pci; member
222 * struct msi_dev_domain - The internals of MSI domain info per device
224 * @irqdomain: Pointer to a per device interrupt domain
228 struct irq_domain *domain; member
232 * msi_device_data - MSI per device data
234 * @platform_data: Platform-MSI specific data
256 * msi_first_desc - Get the first MSI descriptor of the default irqdomain
276 * msi_domain_for_each_desc - Iterate the MSI descriptors in a specific domain
279 * @dev: struct device pointer - device to iterate
280 * @domid: The id of the interrupt domain which should be walked.
284 * - The loop must be protected with a msi_lock_descs()/msi_unlock_descs()
286 * - It is safe to remove a retrieved MSI descriptor in the loop.
293 * msi_for_each_desc - Iterate the MSI descriptors in the default irqdomain
296 * @dev: struct device pointer - device to iterate
300 * - The loop must be protected with a msi_lock_descs()/msi_unlock_descs()
302 * - It is safe to remove a retrieved MSI descriptor in the loop.
307 #define msi_desc_to_dev(desc) ((desc)->dev)
312 return desc->iommu_cookie; in msi_desc_get_iommu_cookie()
318 desc->iommu_cookie = iommu_cookie; in msi_desc_set_iommu_cookie()
335 * msi_insert_msi_desc - Allocate and initialize a MSI descriptor in the
336 * default irqdomain and insert it at @init_desc->msi_index
351 * msi_free_msi_descs_range - Free a range of MSI descriptors of a device
365 * msi_free_msi_descs - Free all MSI descriptors of a device in the default irqdomain
389 * Xen uses non-default msi_domain_ops and hence needs a way to populate sysfs
403 * The restore hook is still available even for fully irq domain based
420 * struct msi_domain_ops - MSI interrupt domain callbacks
422 * @msi_init: Domain specific init function for MSI interrupts
423 * @msi_free: Domain specific function to free a MSI interrupts
424 * @msi_prepare: Prepare the allocation of the interrupts in the domain
426 * in the domain
451 int (*msi_init)(struct irq_domain *domain,
455 void (*msi_free)(struct irq_domain *domain,
458 int (*msi_prepare)(struct irq_domain *domain,
461 void (*prepare_desc)(struct irq_domain *domain, msi_alloc_info_t *arg,
465 int (*domain_alloc_irqs)(struct irq_domain *domain,
467 void (*domain_free_irqs)(struct irq_domain *domain,
469 void (*msi_post_free)(struct irq_domain *domain,
474 * struct msi_domain_info - MSI interrupt domain data
476 * @bus_token: The domain bus token
480 * by the domain creation code.
487 * @data: Optional: domain specific data
503 * struct msi_domain_template - Template for MSI device domains
505 * @chip: Interrupt chip for this domain
506 * @ops: MSI domain ops
507 * @info: MSI domain info data
519 * Bit 0-15: Generic MSI functionality which is not subject to restriction
522 * Bit 16-31: Functionality which depends on the underlying parent domain and
524 * a device MSI domain is initialized.
528 * Init non implemented ops callbacks with default MSI domain
537 /* Needs early activate, required for PCI */
554 /* Mask for the domain specific functionality */
557 /* Support multiple PCI MSI interrupts */
559 /* Support PCI MSIX interrupts */
561 /* Is level-triggered capable, using two messages */
563 /* MSI-X entries must be contiguous */
565 /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */
567 /* Support for PCI/IMS */
572 * struct msi_parent_ops - MSI parent domain callbacks and configuration info
574 * @supported_flags: Required: The supported MSI flags of the parent domain
575 * @prefix: Optional: Prefix for the domain and chip name
577 * domain specific domain flags, domain ops and interrupt chip
578 * callbacks when a per device domain is created.
583 bool (*init_dev_msi_info)(struct device *dev, struct irq_domain *domain,
588 bool msi_parent_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
625 struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain);
634 /* When an MSI domain is used as an intermediate domain */
635 int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev,
637 int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev,
654 int platform_msi_device_domain_alloc(struct irq_domain *domain, unsigned int virq,
656 void platform_msi_device_domain_free(struct irq_domain *domain, unsigned int virq,
658 void *platform_msi_get_host_data(struct irq_domain *domain);
674 /* PCI specific interfaces */
685 u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev);