]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
irqchip/msi-lib: Refuse initialization when irq_write_msi_msg() is missing
authorThomas Gleixner <tglx@kernel.org>
Tue, 3 Feb 2026 21:05:44 +0000 (22:05 +0100)
committerThomas Gleixner <tglx@kernel.org>
Tue, 24 Feb 2026 07:17:14 +0000 (08:17 +0100)
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
drivers/irqchip/irq-msi-lib.c

index d5eefc3d72155c39b10a72809f2838a95997c459..45e0ed3134ce1f0c763b6d9fea30d777ccec8b67 100644 (file)
@@ -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? */