Lines Matching +full:pci +full:- +full:domain
1 // SPDX-License-Identifier: GPL-2.0-only
13 #include <linux/pci.h>
28 msg->address_hi = MSI_ADDR_BASE_HI; in __irq_msi_compose_msg()
31 msg->address_hi |= MSI_ADDR_EXT_DEST_ID(cfg->dest_apicid); in __irq_msi_compose_msg()
33 msg->address_lo = in __irq_msi_compose_msg()
35 ((apic->irq_dest_mode == 0) ? in __irq_msi_compose_msg()
39 MSI_ADDR_DEST_ID(cfg->dest_apicid); in __irq_msi_compose_msg()
41 msg->data = in __irq_msi_compose_msg()
45 MSI_DATA_VECTOR(cfg->vector); in __irq_msi_compose_msg()
58 irq_data_get_irq_chip(irqd)->irq_write_msi_msg(irqd, msg); in irq_msi_update_msg()
65 struct irq_data *parent = irqd->parent_data; in msi_set_affinity()
74 ret = parent->chip->irq_set_affinity(parent, mask, force); in msi_set_affinity()
79 * For non-maskable and non-remapped MSI interrupts the migration in msi_set_affinity()
82 * caused by the non-atomic update of the address/data pair. in msi_set_affinity()
85 * - The MSI is maskable (remapped MSI does not use this code path)). in msi_set_affinity()
87 * - The new vector is the same as the old vector in msi_set_affinity()
88 * - The old vector is MANAGED_IRQ_SHUTDOWN_VECTOR (interrupt starts up) in msi_set_affinity()
89 * - The new destination CPU is the same as the old destination CPU in msi_set_affinity()
92 cfg->vector == old_cfg.vector || in msi_set_affinity()
94 cfg->dest_apicid == old_cfg.dest_apicid) { in msi_set_affinity()
136 if (IS_ERR_OR_NULL(this_cpu_read(vector_irq[cfg->vector]))) in msi_set_affinity()
137 this_cpu_write(vector_irq[cfg->vector], VECTOR_RETRIGGERED); in msi_set_affinity()
140 old_cfg.vector = cfg->vector; in msi_set_affinity()
164 if (lapic_vector_set_in_irr(cfg->vector)) in msi_set_affinity()
165 irq_data_get_irq_chip(irqd)->irq_retrigger(irqd); in msi_set_affinity()
171 * IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices,
172 * which implement the MSI or MSI-X Capability Structure.
175 .name = "PCI-MSI",
184 int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, in pci_msi_prepare() argument
191 if (desc->msi_attrib.is_msix) { in pci_msi_prepare()
192 arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSIX; in pci_msi_prepare()
194 arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSI; in pci_msi_prepare()
195 arg->flags |= X86_IRQ_ALLOC_CONTIGUOUS_VECTORS; in pci_msi_prepare()
223 fn = irq_domain_alloc_named_fwnode("PCI-MSI"); in native_create_pci_msi_domain()
231 pr_warn("Failed to initialize PCI-MSI irqdomain.\n"); in native_create_pci_msi_domain()
233 d->flags |= IRQ_DOMAIN_MSI_NOMASK_QUIRK; in native_create_pci_msi_domain()
245 .name = "IR-PCI-MSI",
281 dmar_msi_write(data->irq, msg); in dmar_msi_write_msg()
285 .name = "DMAR-MSI",
295 static int dmar_msi_init(struct irq_domain *domain, in dmar_msi_init() argument
299 irq_domain_set_info(domain, virq, arg->devid, info->chip, NULL, in dmar_msi_init()
300 handle_edge_irq, arg->data, "edge"); in dmar_msi_init()
325 fn = irq_domain_alloc_named_fwnode("DMAR-MSI"); in dmar_get_irq_domain()
339 struct irq_domain *domain = dmar_get_irq_domain(); in dmar_alloc_hwirq() local
342 if (!domain) in dmar_alloc_hwirq()
343 return -1; in dmar_alloc_hwirq()
351 return irq_domain_alloc_irqs(domain, 1, node, &info); in dmar_alloc_hwirq()
364 static inline int hpet_dev_id(struct irq_domain *domain) in hpet_dev_id() argument
366 struct msi_domain_info *info = msi_get_domain_info(domain); in hpet_dev_id()
368 return (int)(long)info->data; in hpet_dev_id()
377 .name = "HPET-MSI",
387 static int hpet_msi_init(struct irq_domain *domain, in hpet_msi_init() argument
392 irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL, in hpet_msi_init()
393 handle_edge_irq, arg->data, "edge"); in hpet_msi_init()
398 static void hpet_msi_free(struct irq_domain *domain, in hpet_msi_free() argument
430 domain_info->data = (void *)(long)hpet_id; in hpet_create_irq_domain()
439 hpet_msi_controller.name = "IR-HPET-MSI"; in hpet_create_irq_domain()
456 int hpet_assign_irq(struct irq_domain *domain, struct hpet_channel *hc, in hpet_assign_irq() argument
464 info.devid = hpet_dev_id(domain); in hpet_assign_irq()
467 return irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, &info); in hpet_assign_irq()