diff options
-rw-r--r-- | drivers/base/platform-msi.c | 3 | ||||
-rw-r--r-- | drivers/bus/fsl-mc/fsl-mc-msi.c | 2 | ||||
-rw-r--r-- | drivers/pci/msi.c | 3 | ||||
-rw-r--r-- | include/linux/irq.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c index 8e22073aeeed..60d6cc618f1c 100644 --- a/drivers/base/platform-msi.c +++ b/drivers/base/platform-msi.c | |||
@@ -101,6 +101,9 @@ static void platform_msi_update_chip_ops(struct msi_domain_info *info) | |||
101 | chip->irq_set_affinity = msi_domain_set_affinity; | 101 | chip->irq_set_affinity = msi_domain_set_affinity; |
102 | if (!chip->irq_write_msi_msg) | 102 | if (!chip->irq_write_msi_msg) |
103 | chip->irq_write_msi_msg = platform_msi_write_msg; | 103 | chip->irq_write_msi_msg = platform_msi_write_msg; |
104 | if (WARN_ON((info->flags & MSI_FLAG_LEVEL_CAPABLE) && | ||
105 | !(chip->flags & IRQCHIP_SUPPORTS_LEVEL_MSI))) | ||
106 | info->flags &= ~MSI_FLAG_LEVEL_CAPABLE; | ||
104 | } | 107 | } |
105 | 108 | ||
106 | static void platform_msi_free_descs(struct device *dev, int base, int nvec) | 109 | static void platform_msi_free_descs(struct device *dev, int base, int nvec) |
diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c index ec35e255b496..8b9c66d7c4ff 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c | |||
@@ -163,6 +163,8 @@ struct irq_domain *fsl_mc_msi_create_irq_domain(struct fwnode_handle *fwnode, | |||
163 | { | 163 | { |
164 | struct irq_domain *domain; | 164 | struct irq_domain *domain; |
165 | 165 | ||
166 | if (WARN_ON((info->flags & MSI_FLAG_LEVEL_CAPABLE))) | ||
167 | info->flags &= ~MSI_FLAG_LEVEL_CAPABLE; | ||
166 | if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) | 168 | if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) |
167 | fsl_mc_msi_update_dom_ops(info); | 169 | fsl_mc_msi_update_dom_ops(info); |
168 | if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) | 170 | if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) |
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, | |||
1434 | { | 1434 | { |
1435 | struct irq_domain *domain; | 1435 | struct irq_domain *domain; |
1436 | 1436 | ||
1437 | if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE)) | ||
1438 | info->flags &= ~MSI_FLAG_LEVEL_CAPABLE; | ||
1439 | |||
1437 | if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) | 1440 | if (info->flags & MSI_FLAG_USE_DEF_DOM_OPS) |
1438 | pci_msi_domain_update_dom_ops(info); | 1441 | pci_msi_domain_update_dom_ops(info); |
1439 | if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) | 1442 | if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 65916a305f3d..b2067083aa94 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -512,6 +512,7 @@ enum { | |||
512 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), | 512 | IRQCHIP_SKIP_SET_WAKE = (1 << 4), |
513 | IRQCHIP_ONESHOT_SAFE = (1 << 5), | 513 | IRQCHIP_ONESHOT_SAFE = (1 << 5), |
514 | IRQCHIP_EOI_THREADED = (1 << 6), | 514 | IRQCHIP_EOI_THREADED = (1 << 6), |
515 | IRQCHIP_SUPPORTS_LEVEL_MSI = (1 << 7), | ||
515 | }; | 516 | }; |
516 | 517 | ||
517 | #include <linux/irqdesc.h> | 518 | #include <linux/irqdesc.h> |