@@ -1125,6 +1125,8 @@ static void its_irq_compose_msi_msg(struct irq_data *d, struct msi_msg *msg)
{
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
struct its_node *its;
+ struct iommu_group *group;
+ struct device *dev;
u64 addr;
its = its_dev->its;
@@ -1134,7 +1136,12 @@ static void its_irq_compose_msi_msg(struct irq_data *d, struct msi_msg *msg)
msg->address_hi = upper_32_bits(addr);
msg->data = its_get_event_id(d);
- iommu_dma_map_msi_msg(d->irq, msg);
+ dev = msi_desc_to_dev(irq_get_msi_desc(d->irq));
+ group = iommu_group_get(dev);
+ if (group) {
+ iommu_dma_map_msi_msg(d->irq, msg);
+ iommu_group_put(group);
+ }
}
static int its_irq_set_irqchip_state(struct irq_data *d,