Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

soc: ti: knav_qmss_queue: Use IRQF_NO_AUTOEN flag in request_irq()

As commit cbe16f35bee6 ("genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()")
said, reqeust_irq() and then disable_irq() is unsafe. In the small time gap
between request_irq() and disable_irq(), interrupts can still come.

IRQF_NO_AUTOEN flag can be used by drivers to request_irq(). It prevents
the automatic enabling of the requested interrupt in the same
safe way. With that the usage can be simplified and corrected.

Compile-tested only.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240914082532.344456-1-ruanjinjie@huawei.com
Signed-off-by: Nishanth Menon <nm@ti.com>

authored by

Jinjie Ruan and committed by
Nishanth Menon
10b8a0cc 9852d85e

+2 -3
+2 -3
drivers/soc/ti/knav_qmss_queue.c
··· 119 119 120 120 if (range->flags & RANGE_HAS_IRQ) { 121 121 irq = range->irqs[queue].irq; 122 - ret = request_irq(irq, knav_queue_int_handler, 0, 123 - inst->irq_name, inst); 122 + ret = request_irq(irq, knav_queue_int_handler, IRQF_NO_AUTOEN, 123 + inst->irq_name, inst); 124 124 if (ret) 125 125 return ret; 126 - disable_irq(irq); 127 126 if (range->irqs[queue].cpu_mask) { 128 127 ret = irq_set_affinity_hint(irq, range->irqs[queue].cpu_mask); 129 128 if (ret) {