hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/irqchip/irq-ls-scfg-msi.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Freescale SCFG MSI(-X) support
34 *
45 * Copyright (C) 2016 Freescale Semiconductor.
56 *
67 * Author: Minghuan Lian <Minghuan.Lian@nxp.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/kernel.h>
....@@ -100,7 +97,7 @@
10097 msg->data |= cpumask_first(mask);
10198 }
10299
103
- iommu_dma_map_msi_msg(data->irq, msg);
100
+ iommu_dma_compose_msi_msg(irq_data_get_msi_desc(data), msg);
104101 }
105102
106103 static int ls_scfg_msi_set_affinity(struct irq_data *irq_data,
....@@ -141,6 +138,7 @@
141138 unsigned int nr_irqs,
142139 void *args)
143140 {
141
+ msi_alloc_info_t *info = args;
144142 struct ls_scfg_msi *msi_data = domain->host_data;
145143 int pos, err = 0;
146144
....@@ -157,6 +155,10 @@
157155 if (err)
158156 return err;
159157
158
+ err = iommu_dma_prepare_msi(info->desc, msi_data->msiir_addr);
159
+ if (err)
160
+ return err;
161
+
160162 irq_domain_set_info(domain, virq, pos,
161163 &ls_scfg_msi_parent_chip, msi_data,
162164 handle_simple_irq, NULL, NULL);