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.

mailbox: bcm-ferxrm-mailbox: Use default primary handler

request_threaded_irq() is invoked with a primary and a secondary handler
and no flags are passed. The primary handler is the same as
irq_default_primary_handler() so there is no need to have an identical
copy.

The lack of the IRQF_ONESHOT flag can be dangerous because the interrupt
source is not masked while the threaded handler is active. This means,
especially on LEVEL typed interrupt lines, the interrupt can fire again
before the threaded handler had a chance to run.

Use the default primary interrupt handler by specifying NULL and set
IRQF_ONESHOT so the interrupt source is masked until the secondary handler
is done.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260128095540.863589-5-bigeasy@linutronix.de

authored by

Sebastian Andrzej Siewior and committed by
Thomas Gleixner
03843d95 5bfcdccb

+2 -12
+2 -12
drivers/mailbox/bcm-flexrm-mailbox.c
··· 1173 1173 1174 1174 /* ====== FlexRM interrupt handler ===== */ 1175 1175 1176 - static irqreturn_t flexrm_irq_event(int irq, void *dev_id) 1177 - { 1178 - /* We only have MSI for completions so just wakeup IRQ thread */ 1179 - /* Ring related errors will be informed via completion descriptors */ 1180 - 1181 - return IRQ_WAKE_THREAD; 1182 - } 1183 - 1184 1176 static irqreturn_t flexrm_irq_thread(int irq, void *dev_id) 1185 1177 { 1186 1178 flexrm_process_completions(dev_id); ··· 1263 1271 ret = -ENODEV; 1264 1272 goto fail_free_cmpl_memory; 1265 1273 } 1266 - ret = request_threaded_irq(ring->irq, 1267 - flexrm_irq_event, 1268 - flexrm_irq_thread, 1269 - 0, dev_name(ring->mbox->dev), ring); 1274 + ret = request_threaded_irq(ring->irq, NULL, flexrm_irq_thread, 1275 + IRQF_ONESHOT, dev_name(ring->mbox->dev), ring); 1270 1276 if (ret) { 1271 1277 dev_err(ring->mbox->dev, 1272 1278 "failed to request ring%d IRQ\n", ring->num);