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

genirq/msi: Return MSI_XA_DOMAIN_SIZE as the maximum MSI index when no domain is present



On architectures such as s390 that do not use irq domains for MSI,
returning 0 as the maximum MSI index is a bit counter-productive,
as it indicates that no MSI can be allocated. Bad idea.

Instead, return the maximum we're willing to support in the MSI
backing store (MSI_XA_DOMAIN_SIZE), and let the arch code do its
usual thing.

Thanks to Matthew Rosato for fixing the fix.

Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
[maz: commit message]
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/87fsdgzpqs.ffs@tglx
parent db3568fd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -610,8 +610,8 @@ static unsigned int msi_domain_get_hwsize(struct device *dev, unsigned int domid
		info = domain->host_data;
		return info->hwsize;
	}
	/* No domain, no size... */
	return 0;
	/* No domain, default to MSI_XA_DOMAIN_SIZE */
	return MSI_XA_DOMAIN_SIZE;
}

static inline void irq_chip_write_msi_msg(struct irq_data *data,