[PATCH 0/2] Check for MSI allocation

From: Julian Vetter
Date: Thu Jun 09 2022 - 11:45:23 EST


Our HW has a mailbox periph that supports up to 8192 MSIs, so the currently
supported 2048 is not enough. I believe there is no real reason to
contstrain the max platform MSIs to 2048, because the value is stored in
an irq_hw_number_t which is big enough to hold more MSIs. The value is
OR'ed with the device ID of which there is also a limited number.
The second patch contains a WARN() to warn the user if a device tries to
obtain more that MAX_DEV_MSIS, because this could lead to potentially
conflicting virtual interrupt numbers (as was the case for us) without
the Linux kernel telling us.

Julian Vetter (2):
msi: The MSI framework only supports 2048 platform MSIs
msi: Add sanity check if more than MAX_DEV_MSIS MSIs are requested

drivers/base/platform-msi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--
2.17.1