summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-12-16 11:08:52 +0000
committerMarc Zyngier <maz@kernel.org>2022-12-16 14:04:04 +0000
commite982ad82bd8f7931f5788a15dfa3709f7a7ee79f (patch)
treec8ddc0ae0cc97550b9e4edc9a84574b741863373 /kernel/irq
parentdb3568fd80a3999413c04ea0cf52596b7b0ad9aa (diff)
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: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [maz: commit message] Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/87fsdgzpqs.ffs@tglx
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/msi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index e843604c3a4f..955267bbc2be 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -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,