]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/ioapic: Cleanup IO/APIC route entry structs
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Oct 2020 12:48:18 +0000 (14:48 +0200)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 24 Oct 2020 21:26:48 +0000 (22:26 +0100)
commit2dbb24da41954848ef81624ceb4225f0e34878fc
treea1e8a44771d5f04dfd6146074fd53ac214c28f59
parentdcc11e8754f81b679f7eba557c5cb2b1b939143f
x86/ioapic: Cleanup IO/APIC route entry structs

Having two seperate structs for the I/O-APIC RTE entries (non-remapped and
DMAR remapped) requires type casts and makes it hard to map.

Combine them in IO_APIC_routing_entry by defining a union of two 64bit
bitfields. Use naming which reflects which bits are shared and which bits
are actually different for the operating modes.

[dwmw2: Fix it up and finish the job, pulling the 32-bit w1,w2 words for
        register access into the same union and eliminating a few more
        places where bits were accessed through masks and shifts.]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/include/asm/io_apic.h
arch/x86/kernel/apic/io_apic.c
drivers/iommu/amd/iommu.c
drivers/iommu/hyperv-iommu.c
drivers/iommu/intel/irq_remapping.c