From a84277bf3efcc7bb5b5a5eec62de5c134cb47ee5 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 5 Jun 2018 13:43:34 +0200 Subject: [PATCH 1/2] irqchip/stm32: Fix non-SMP build warning A CONFIG_SMP=n build emits a harmless compile-time warning: drivers/irqchip/irq-stm32-exti.c:495:12: error: 'stm32_exti_h_set_affinity' defined but not used [-Werror=unused-function] The #ifdef is inconsistent here, and it's better to use an IS_ENABLED() check that lets the compiler silently drop that function. Fixes: 927abfc4461e ("irqchip/stm32: Add stm32mp1 support with hierarchy domain") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Ludovic Barre Cc: Rob Herring Cc: Benjamin Gaignard Cc: Radoslaw Pietrzyk Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: Maxime Coquelin Cc: Alexandre Torgue Link: https://lkml.kernel.org/r/20180605114347.1347128-1-arnd@arndb.de --- drivers/irqchip/irq-stm32-exti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 5089c1e2838d..3a7e8905a97e 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -552,9 +552,7 @@ static struct irq_chip stm32_exti_h_chip = { .irq_set_type = stm32_exti_h_set_type, .irq_set_wake = stm32_exti_h_set_wake, .flags = IRQCHIP_MASK_ON_SUSPEND, -#ifdef CONFIG_SMP - .irq_set_affinity = stm32_exti_h_set_affinity, -#endif + .irq_set_affinity = IS_ENABLED(CONFIG_SMP) ? stm32_exti_h_set_affinity : NULL, }; static int stm32_exti_h_domain_alloc(struct irq_domain *dm, From 0cdd431c337e99177e68597f3de34bedd3a20a74 Mon Sep 17 00:00:00 2001 From: Laurentiu Tudor Date: Tue, 5 Jun 2018 15:27:27 +0300 Subject: [PATCH 2/2] 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 Signed-off-by: Thomas Gleixner Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: zhiqiang.hou@nxp.com Cc: minghuan.lian@nxp.com Link: https://lkml.kernel.org/r/20180605122727.12831-1-laurentiu.tudor@nxp.com --- 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 #include #include +#include #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,