diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-06-23 18:18:41 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-07-18 21:31:20 +0300 |
commit | 496436f4a514a3fb4bc7aecd41f0dd4b38e39b1f (patch) | |
tree | d1acb7d3d76a4ea0be4cf2fafbc403bbacd4ab8a /drivers/irqchip/irq-msi-lib.c | |
parent | b5712bf89b4bbc5bcc9ebde8753ad222f1f68296 (diff) | |
download | linux-496436f4a514a3fb4bc7aecd41f0dd4b38e39b1f.tar.xz |
irqchip/irq-msi-lib: Prepare for DEVICE MSI to replace platform MSI
Add the prerequisites for DEVICE MSI into the shared select() and child
domain init function. These domains are really trivial and just provide a
custom irq chip callback to write the MSI message.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240623142235.085171290@linutronix.de
Diffstat (limited to 'drivers/irqchip/irq-msi-lib.c')
-rw-r--r-- | drivers/irqchip/irq-msi-lib.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-msi-lib.c b/drivers/irqchip/irq-msi-lib.c index ef26962a31ee..b98a2191c860 100644 --- a/drivers/irqchip/irq-msi-lib.c +++ b/drivers/irqchip/irq-msi-lib.c @@ -57,6 +57,21 @@ bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain, return false; break; + case DOMAIN_BUS_DEVICE_MSI: + /* + * Per device MSI should never have any MSI feature bits + * set. It's sole purpose is to create a dumb interrupt + * chip which has a device specific irq_write_msi_msg() + * callback. + */ + if (WARN_ON_ONCE(info->flags)) + return false; + + /* Core managed MSI descriptors */ + info->flags = MSI_FLAG_ALLOC_SIMPLE_MSI_DESCS | MSI_FLAG_FREE_MSI_DESCS; + /* Remove PCI specific flags */ + required_flags &= ~MSI_FLAG_PCI_MSI_MASK_PARENT; + break; default: /* * This should never be reached. See |