From ad0d839206b058e4adede7201b82b42e4c9519f7 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Wed, 4 Feb 2015 21:29:46 -0800 Subject: [PATCH] iommu/arm-smmu: use a threaded handler for global faults We need to do some sleeping operations (like enabling clocks) in the global fault handler. Move to a threaded handler to avoid BUGs due to sleeping in an atomic context. Change-Id: I88eed743bfad4cc33daf3b9f81255587c72b0167 Signed-off-by: Mitchel Humpherys --- drivers/iommu/arm-smmu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index f73279c8b09f..0144acff5a54 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2588,11 +2588,10 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev) } for (i = 0; i < smmu->num_global_irqs; ++i) { - err = request_irq(smmu->irqs[i], - arm_smmu_global_fault, - IRQF_SHARED, - "arm-smmu global fault", - smmu); + err = request_threaded_irq(smmu->irqs[i], + NULL, arm_smmu_global_fault, + IRQF_ONESHOT | IRQF_SHARED, + "arm-smmu global fault", smmu); if (err) { dev_err(dev, "failed to request global IRQ %d (%u)\n", i, smmu->irqs[i]);