Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling

In some irqchip implementations the fwnode representing the IRQdomain
and the MSI controller fwnode do not match; in particular the IRQdomain
fwnode is the MSI controller fwnode parent.

To support selecting such IRQ domains, add a flag in core IRQ domain
code that explicitly tells the MSI lib to use the parent fwnode while
carrying out IRQ domain selection.

Update the msi-lib select callback with the resulting logic.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250703-gicv5-host-v7-27-12e71f1b3528@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>

authored by

Lorenzo Pieralisi and committed by
Marc Zyngier
8b65db1e b4ead12d

+7 -1
+4 -1
drivers/irqchip/irq-msi-lib.c
··· 133 133 { 134 134 const struct msi_parent_ops *ops = d->msi_parent_ops; 135 135 u32 busmask = BIT(bus_token); 136 + struct fwnode_handle *fwh; 136 137 137 138 if (!ops) 138 139 return 0; 139 140 140 - if (fwspec->fwnode != d->fwnode || fwspec->param_count != 0) 141 + fwh = d->flags & IRQ_DOMAIN_FLAG_FWNODE_PARENT ? fwnode_get_parent(fwspec->fwnode) 142 + : fwspec->fwnode; 143 + if (fwh != d->fwnode || fwspec->param_count != 0) 141 144 return 0; 142 145 143 146 /* Handle pure domain searches */
+3
include/linux/irqdomain.h
··· 212 212 /* Address and data pair is mutable when irq_set_affinity() */ 213 213 IRQ_DOMAIN_FLAG_MSI_IMMUTABLE = (1 << 11), 214 214 215 + /* IRQ domain requires parent fwnode matching */ 216 + IRQ_DOMAIN_FLAG_FWNODE_PARENT = (1 << 12), 217 + 215 218 /* 216 219 * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved 217 220 * for implementation specific purposes and ignored by the