Commit 06526443 authored by Marc Zyngier's avatar Marc Zyngier Committed by Thomas Gleixner
Browse files

irqchip/msi-lib: Honour the MSI_FLAG_NO_AFFINITY flag



Bad MSI implementations multiplex MSIs onto a single downstream interrupt,
meaning they have no concept of individual affinity.

The old MSI code did a reasonable job at this by honouring the
MSI_FLAG_NO_AFFINITY, but the new shiny device MSI code doesn't.

Teach it about the sad reality of existing hardware.

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250513172819.2216709-7-maz@kernel.org
parent b35961ce
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -105,7 +105,12 @@ bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
	 * MSI message into the hardware which is the whole purpose of the
	 * device MSI domain aside of mask/unmask which is provided e.g. by
	 * PCI/MSI device domains.
	 *
	 * The exception to the rule is when the underlying domain
	 * tells you that affinity is not a thing -- for example when
	 * everything is muxed behind a single interrupt.
	 */
	if (!chip->irq_set_affinity && !(info->flags & MSI_FLAG_NO_AFFINITY))
		chip->irq_set_affinity = msi_domain_set_affinity;
	return true;
}