aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2017-08-31 09:44:26 -0400
committerWill Deacon <will.deacon@arm.com>2017-10-20 11:55:07 -0400
commitdce032a15ced2ee9fa58ed7b52c492795d096a40 (patch)
tree39a0e22efaa126e4196ae085dfad74bcbefae3f9
parent2f657add07a8f758e41076820157eeca1df22b79 (diff)
iommu/arm-smmu-v3: Forget about cmdq-sync interrupt
The cmdq-sync interrupt is never going to be particularly useful, since for stage 1 DMA at least we'll often need to wait for sync completion within someone else's IRQ handler, thus have to implement polling anyway. Beyond that, the overhead of taking an interrupt, then still having to grovel around in the queue to figure out *which* sync command completed, doesn't seem much more attractive than simple polling either. Furthermore, if an implementation both has wired interrupts and supports MSIs, then we don't want to be taking the IRQ unnecessarily if we're using the MSI write to update memory. Let's just make life simpler by not even bothering to claim it in the first place. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--drivers/iommu/arm-smmu-v3.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 18a0fa7dd72d..aa3bd3968290 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1299,12 +1299,6 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev)
1299 return IRQ_HANDLED; 1299 return IRQ_HANDLED;
1300} 1300}
1301 1301
1302static irqreturn_t arm_smmu_cmdq_sync_handler(int irq, void *dev)
1303{
1304 /* We don't actually use CMD_SYNC interrupts for anything */
1305 return IRQ_HANDLED;
1306}
1307
1308static int arm_smmu_device_disable(struct arm_smmu_device *smmu); 1302static int arm_smmu_device_disable(struct arm_smmu_device *smmu);
1309 1303
1310static irqreturn_t arm_smmu_gerror_handler(int irq, void *dev) 1304static irqreturn_t arm_smmu_gerror_handler(int irq, void *dev)
@@ -1337,10 +1331,8 @@ static irqreturn_t arm_smmu_gerror_handler(int irq, void *dev)
1337 if (active & GERROR_MSI_EVTQ_ABT_ERR) 1331 if (active & GERROR_MSI_EVTQ_ABT_ERR)
1338 dev_warn(smmu->dev, "EVTQ MSI write aborted\n"); 1332 dev_warn(smmu->dev, "EVTQ MSI write aborted\n");
1339 1333
1340 if (active & GERROR_MSI_CMDQ_ABT_ERR) { 1334 if (active & GERROR_MSI_CMDQ_ABT_ERR)
1341 dev_warn(smmu->dev, "CMDQ MSI write aborted\n"); 1335 dev_warn(smmu->dev, "CMDQ MSI write aborted\n");
1342 arm_smmu_cmdq_sync_handler(irq, smmu->dev);
1343 }
1344 1336
1345 if (active & GERROR_PRIQ_ABT_ERR) 1337 if (active & GERROR_PRIQ_ABT_ERR)
1346 dev_err(smmu->dev, "PRIQ write aborted -- events may have been lost\n"); 1338 dev_err(smmu->dev, "PRIQ write aborted -- events may have been lost\n");
@@ -1369,7 +1361,6 @@ static irqreturn_t arm_smmu_combined_irq_thread(int irq, void *dev)
1369static irqreturn_t arm_smmu_combined_irq_handler(int irq, void *dev) 1361static irqreturn_t arm_smmu_combined_irq_handler(int irq, void *dev)
1370{ 1362{
1371 arm_smmu_gerror_handler(irq, dev); 1363 arm_smmu_gerror_handler(irq, dev);
1372 arm_smmu_cmdq_sync_handler(irq, dev);
1373 return IRQ_WAKE_THREAD; 1364 return IRQ_WAKE_THREAD;
1374} 1365}
1375 1366
@@ -2286,15 +2277,6 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
2286 dev_warn(smmu->dev, "failed to enable evtq irq\n"); 2277 dev_warn(smmu->dev, "failed to enable evtq irq\n");
2287 } 2278 }
2288 2279
2289 irq = smmu->cmdq.q.irq;
2290 if (irq) {
2291 ret = devm_request_irq(smmu->dev, irq,
2292 arm_smmu_cmdq_sync_handler, 0,
2293 "arm-smmu-v3-cmdq-sync", smmu);
2294 if (ret < 0)
2295 dev_warn(smmu->dev, "failed to enable cmdq-sync irq\n");
2296 }
2297
2298 irq = smmu->gerr_irq; 2280 irq = smmu->gerr_irq;
2299 if (irq) { 2281 if (irq) {
2300 ret = devm_request_irq(smmu->dev, irq, arm_smmu_gerror_handler, 2282 ret = devm_request_irq(smmu->dev, irq, arm_smmu_gerror_handler,
@@ -2803,10 +2785,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
2803 if (irq > 0) 2785 if (irq > 0)
2804 smmu->priq.q.irq = irq; 2786 smmu->priq.q.irq = irq;
2805 2787
2806 irq = platform_get_irq_byname(pdev, "cmdq-sync");
2807 if (irq > 0)
2808 smmu->cmdq.q.irq = irq;
2809
2810 irq = platform_get_irq_byname(pdev, "gerror"); 2788 irq = platform_get_irq_byname(pdev, "gerror");
2811 if (irq > 0) 2789 if (irq > 0)
2812 smmu->gerr_irq = irq; 2790 smmu->gerr_irq = irq;