x86/irq: Add allocation type for parent domain retrieval
authorThomas Gleixner <tglx@linutronix.de>
Wed, 26 Aug 2020 11:16:36 +0000 (13:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Sep 2020 14:52:29 +0000 (16:52 +0200)
commitb4c364da32cf3b85297648ff5563de2c47d9e32f
treee0113ccfac5f55f3ccbc6788a4759d9a68e67239
parent801b5e4c4eec7b6c7f968d4bbce43da7cacffae4
x86/irq: Add allocation type for parent domain retrieval

irq_remapping_ir_irq_domain() is used to retrieve the remapping parent
domain for an allocation type. irq_remapping_irq_domain() is for retrieving
the actual device domain for allocating interrupts for a device.

The two functions are similar and can be unified by using explicit modes
for parent irq domain retrieval.

Add X86_IRQ_ALLOC_TYPE_IOAPIC/HPET_GET_PARENT and use it in the iommu
implementations. Drop the parent domain retrieval for PCI_MSI/X as that is
unused.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20200826112331.436350257@linutronix.de
arch/x86/include/asm/hw_irq.h
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/msi.c
drivers/iommu/amd/iommu.c
drivers/iommu/hyperv-iommu.c
drivers/iommu/intel/irq_remapping.c