Skip to content

Commit dce032a

Browse files
rmurphy-armwildea01
authored andcommitted
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 <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 2f657ad commit dce032a

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

drivers/iommu/arm-smmu-v3.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,12 +1299,6 @@ static irqreturn_t arm_smmu_priq_thread(int irq, void *dev)
12991299
return IRQ_HANDLED;
13001300
}
13011301

1302-
static 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-
13081302
static int arm_smmu_device_disable(struct arm_smmu_device *smmu);
13091303

13101304
static 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)
13371331
if (active & GERROR_MSI_EVTQ_ABT_ERR)
13381332
dev_warn(smmu->dev, "EVTQ MSI write aborted\n");
13391333

1340-
if (active & GERROR_MSI_CMDQ_ABT_ERR) {
1334+
if (active & GERROR_MSI_CMDQ_ABT_ERR)
13411335
dev_warn(smmu->dev, "CMDQ MSI write aborted\n");
1342-
arm_smmu_cmdq_sync_handler(irq, smmu->dev);
1343-
}
13441336

13451337
if (active & GERROR_PRIQ_ABT_ERR)
13461338
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)
13691361
static irqreturn_t arm_smmu_combined_irq_handler(int irq, void *dev)
13701362
{
13711363
arm_smmu_gerror_handler(irq, dev);
1372-
arm_smmu_cmdq_sync_handler(irq, dev);
13731364
return IRQ_WAKE_THREAD;
13741365
}
13751366

@@ -2286,15 +2277,6 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
22862277
dev_warn(smmu->dev, "failed to enable evtq irq\n");
22872278
}
22882279

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-
22982280
irq = smmu->gerr_irq;
22992281
if (irq) {
23002282
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)
28032785
if (irq > 0)
28042786
smmu->priq.q.irq = irq;
28052787

2806-
irq = platform_get_irq_byname(pdev, "cmdq-sync");
2807-
if (irq > 0)
2808-
smmu->cmdq.q.irq = irq;
2809-
28102788
irq = platform_get_irq_byname(pdev, "gerror");
28112789
if (irq > 0)
28122790
smmu->gerr_irq = irq;

0 commit comments

Comments
 (0)