diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-02-04 00:05:44 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-02-24 10:17:14 +0300 |
| commit | aa80869b77e16d30ce69523528c63a2e2b050634 (patch) | |
| tree | 41a8b2d1c4b1c981e4dbf08e17151e5453b0eda4 | |
| parent | 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff) | |
| download | linux-aa80869b77e16d30ce69523528c63a2e2b050634.tar.xz | |
irqchip/msi-lib: Refuse initialization when irq_write_msi_msg() is missing
MSI parent domains rely on the fact that the top level device domain
provides a irq_write_msi_msg() callback.
Check for that and if missing warn and refuse to initialize the device domain.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/87a4xp35cn.ffs@tglx
| -rw-r--r-- | drivers/irqchip/irq-msi-lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-msi-lib.c b/drivers/irqchip/irq-msi-lib.c index d5eefc3d7215..45e0ed3134ce 100644 --- a/drivers/irqchip/irq-msi-lib.c +++ b/drivers/irqchip/irq-msi-lib.c @@ -48,6 +48,9 @@ bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain, return false; } + if (WARN_ON_ONCE(!chip->irq_write_msi_msg)) + return false; + required_flags = pops->required_flags; /* Is the target domain bus token supported? */ |
