]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu/dma: Add support for mapping MSIs
authorRobin Murphy <robin.murphy@arm.com>
Mon, 12 Sep 2016 16:13:59 +0000 (17:13 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 16 Sep 2016 08:34:22 +0000 (09:34 +0100)
commit44bb7e243bd4b4e5c79de2452cd9762582f58925
treebf0d949ec860769d523d512dc26b20c9ce26e945
parent455eb7d34ad11b09490f70c33973f9f3e31c4df6
iommu/dma: Add support for mapping MSIs

When an MSI doorbell is located downstream of an IOMMU, attaching
devices to a DMA ops domain and switching on translation leads to a rude
shock when their attempt to write to the physical address returned by
the irqchip driver faults (or worse, writes into some already-mapped
buffer) and no interrupt is forthcoming.

Address this by adding a hook for relevant irqchip drivers to call from
their compose_msi_msg() callback, to swizzle the physical address with
an appropriatly-mapped IOVA for any device attached to one of our DMA
ops domains.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/dma-iommu.c
drivers/irqchip/irq-gic-v2m.c
drivers/irqchip/irq-gic-v3-its.c
include/linux/dma-iommu.h