x86/xen: Rework MSI teardown
authorThomas Gleixner <tglx@linutronix.de>
Wed, 26 Aug 2020 11:16:55 +0000 (13:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2020 14:52:36 +0000 (16:52 +0200)
commit7d4d892de6e74194fcfd4ff69f21ba3da97ae282
treeeb32056662c3faba9b0180923b6178ca4997a90c
parent2905c50b7d3eabd0fe718247aac86eeff3924ff8
x86/xen: Rework MSI teardown

X86 cannot store the irq domain pointer in struct device without breaking
XEN because the irq domain pointer takes precedence over arch_*_msi_irqs()
fallbacks.

XENs MSI teardown relies on default_teardown_msi_irqs() which invokes
arch_teardown_msi_irq(). default_teardown_msi_irqs() is a trivial iterator
over the msi entries associated to a device.

Implement this loop in xen_teardown_msi_irqs() to prepare for removal of
the fallbacks for X86.

This is a preparatory step to wrap XEN MSI alloc/free into a irq domain
which in turn allows to store the irq domain pointer in struct device and
to use the irq domain functions directly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200826112333.326841410@linutronix.de
arch/x86/pci/xen.c