Skip to content

Commit c768968

Browse files
larsclausenmathieupoirier
authored andcommitted
remoteproc: ingenic: Request IRQ disabled
The ingenic remoteproc driver requests its IRQ and then immediately disables it. The disable is necessary since irq_request() normally enables the IRQ. But there is a new flag IRQF_NO_AUTOEN that when specified keeps the IRQ disabled. Use this new flag rather than calling disable_irq(). This slightly reduce the boilerplate code and also avoids a theoretical race condition where the IRQ could fire between irq_request() and disable_irq(). Signed-off-by: Lars-Peter Clausen <[email protected]> Acked-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent b20dc02 commit c768968

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/remoteproc/ingenic_rproc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,13 @@ static int ingenic_rproc_probe(struct platform_device *pdev)
218218
if (vpu->irq < 0)
219219
return vpu->irq;
220220

221-
ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, 0, "VPU", rproc);
221+
ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, IRQF_NO_AUTOEN,
222+
"VPU", rproc);
222223
if (ret < 0) {
223224
dev_err(dev, "Failed to request IRQ\n");
224225
return ret;
225226
}
226227

227-
disable_irq(vpu->irq);
228-
229228
ret = devm_rproc_add(dev, rproc);
230229
if (ret) {
231230
dev_err(dev, "Failed to register remote processor\n");

0 commit comments

Comments
 (0)