summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-05-08 14:14:31 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-05-13 15:58:59 +0200
commit6988e0e0d28328467e218f59589b2770675a9ebd (patch)
tree823e5cb928612d0bf2186f1600c0191124156eb8 /drivers/pci/msi.c
parentgenirq/msi: Allow level-triggered MSIs to be exposed by MSI providers (diff)
downloadlinux-6988e0e0d28328467e218f59589b2770675a9ebd.tar.xz
linux-6988e0e0d28328467e218f59589b2770675a9ebd.zip
genirq/msi: Limit level-triggered MSI to platform devices
Nobody would be insane enough to try and use level triggered MSIs on PCI, but let's make sure it doesn't happen. Also, let's mandate that the irqchip backing the platform MSI domain is providing the IRQCHIP_SUPPORTS_LEVEL_MSI flag. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Rob Herring <robh@kernel.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lkml.kernel.org/r/20180508121438.11301-3-marc.zyngier@arm.com
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 30250631efe7..f45b74fcc059 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1434,6 +1434,9 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
{
struct irq_domain *domain;
+ if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE))
+ info->flags &= ~MSI_FLAG_LEVEL_CAPABLE;
+
if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS)
pci_msi_domain_update_dom_ops(info);
if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS)