irqdomain/msi: Allow to override msi_domain_alloc/free_irqs()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 26 Aug 2020 11:16:57 +0000 (13:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2020 14:52:37 +0000 (16:52 +0200)
commit43e9e705dd57c466c4bfe32ab8c17db537b89297
tree98da32e8a14d377b8475e0fd49f9379ae3df5dec
parent70b59379efc3c818f48b8037e574654fb29f907c
irqdomain/msi: Allow to override msi_domain_alloc/free_irqs()

To support MSI irq domains which do not fit at all into the regular MSI
irqdomain scheme, like the XEN MSI interrupt management for PV/HVM/DOM0,
it's necessary to allow to override the alloc/free implementation.

This is a preperatory step to switch X86 away from arch_*_msi_irqs() and
store the irq domain pointer right in struct device.

No functional change for existing MSI irq domain users.

Aside of the evil XEN wrapper this is also useful for special MSI domains
which need to do extra alloc/free work before/after calling the generic
core function. Work like allocating/freeing MSI descriptors, MSI storage
space etc.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200826112333.526797548@linutronix.de
include/linux/msi.h
kernel/irq/msi.c