RE: [upstream-release] [PATCH] irqchip/ls-scfg-msi: map MSIs in the iommu

From: Bharat Bhushan
Date: Wed Jun 06 2018 - 06:23:48 EST




> -----Original Message-----
> From: upstream-release-bounces@xxxxxxxxxxxxxxxxxxx [mailto:upstream-
> release-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Laurentiu Tudor
> Sent: Tuesday, June 5, 2018 5:57 PM
> To: tglx@xxxxxxxxxxxxx; jason@xxxxxxxxxxxxxx; marc.zyngier@xxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Cc: M.h. Lian <minghuan.lian@xxxxxxx>; Z.q. Hou <zhiqiang.hou@xxxxxxx>;
> Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
> Subject: [upstream-release] [PATCH] irqchip/ls-scfg-msi: map MSIs in the iommu
>
> Add the required iommu_dma_map_msi_msg() when composing the MSI
> message, otherwise the interrupts will not work.
>
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>

Reviewed-by: Bharat Bhushan <bharat.bhushan@xxxxxxx>

Thanks
-Bharat
> ---
> drivers/irqchip/irq-ls-scfg-msi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c
> index 57e3d900f19e..1ec3bfe56693 100644
> --- a/drivers/irqchip/irq-ls-scfg-msi.c
> +++ b/drivers/irqchip/irq-ls-scfg-msi.c
> @@ -21,6 +21,7 @@
> #include <linux/of_pci.h>
> #include <linux/of_platform.h>
> #include <linux/spinlock.h>
> +#include <linux/dma-iommu.h>
>
> #define MSI_IRQS_PER_MSIR 32
> #define MSI_MSIR_OFFSET 4
> @@ -94,6 +95,8 @@ static void ls_scfg_msi_compose_msg(struct irq_data
> *data, struct msi_msg *msg)
>
> if (msi_affinity_flag)
> msg->data |= cpumask_first(data->common->affinity);
> +
> + iommu_dma_map_msi_msg(data->irq, msg);
> }
>
> static int ls_scfg_msi_set_affinity(struct irq_data *irq_data,
> --
> 2.17.0
>
> _______________________________________________
> upstream-release mailing list
> upstream-release@xxxxxxxxxxxxxxxxxxx
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flinux.fr
> eescale.net%2Fmailman%2Flistinfo%2Fupstream-
> release&data=02%7C01%7Cbharat.bhushan%40nxp.com%7Cba9303002bf142d9
> b63308d5cadfc179%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63
> 6637984747938689&sdata=3Hg2OVpp%2Bhfdj0qbCFLWLwBn0RFoNhlPPdmxGf
> AspyA%3D&reserved=0