diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-25 00:25:51 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-12-05 19:21:01 +0100 |
commit | 61bf992fc618503c910416f28afa0b015838b72b (patch) | |
tree | cb7076b5658c01be314cd01a5a687a018c79b107 /include | |
parent | ebca4396ee18521e9e5d435a15e5d0ab2eb6b009 (diff) |
genirq/msi: Add size info to struct msi_domain_info
To allow proper range checking especially for dynamic allocations add a
size field to struct msi_domain_info. If the field is 0 then the size is
unknown or unlimited (up to MSI_MAX_INDEX) to provide backwards
compability.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124232325.501144862@linutronix.de
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/msi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index 7fb87371541a..08a0e2abf048 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -422,6 +422,10 @@ struct msi_domain_ops { * struct msi_domain_info - MSI interrupt domain data * @flags: Flags to decribe features and capabilities * @bus_token: The domain bus token + * @hwsize: The hardware table size or the software index limit. + * If 0 then the size is considered unlimited and + * gets initialized to the maximum software index limit + * by the domain creation code. * @ops: The callback data structure * @chip: Optional: associated interrupt chip * @chip_data: Optional: associated interrupt chip data @@ -433,6 +437,7 @@ struct msi_domain_ops { struct msi_domain_info { u32 flags; enum irq_domain_bus_token bus_token; + unsigned int hwsize; struct msi_domain_ops *ops; struct irq_chip *chip; void *chip_data; |