Skip to content

Commit e982ad8

Browse files
KAGA-KOKOMarc Zyngier
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> [maz: commit message] Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/87fsdgzpqs.ffs@tglx
1 parent db3568f commit e982ad8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/irq/msi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ static unsigned int msi_domain_get_hwsize(struct device *dev, unsigned int domid
610610
info = domain->host_data;
611611
return info->hwsize;
612612
}
613-
/* No domain, no size... */
614-
return 0;
613+
/* No domain, default to MSI_XA_DOMAIN_SIZE */
614+
return MSI_XA_DOMAIN_SIZE;
615615
}
616616

617617
static inline void irq_chip_write_msi_msg(struct irq_data *data,

0 commit comments

Comments
 (0)