genirq/msi: Provide new domain id allocation functions
authorThomas Gleixner <tglx@linutronix.de>
Thu, 24 Nov 2022 23:24:35 +0000 (00:24 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 5 Dec 2022 18:21:00 +0000 (19:21 +0100)
commitf2480e7dacdcd9aab25641346ae53b7ff03777fc
tree921bf1fd59b8eb921a57784943b7202ba0d0e123
parent4cd5f4403f283766f73749c4c936801f58ffe77a
genirq/msi: Provide new domain id allocation functions

Provide two sorts of interfaces to handle the different use cases:

  - msi_domain_alloc_irqs_range():

Handles a caller defined precise range

  - msi_domain_alloc_irqs_all():

Allocates all interrupts associated to a domain by scanning the
     allocated MSI descriptors

The latter is useful for the existing PCI/MSI support which does not have
range information available.

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/20221124230314.396497163@linutronix.de
include/linux/msi.h
kernel/irq/msi.c