Patch "accel/ivpu: Drop IRQF_ONESHOT to allow IPC IRQ threading on PREEMPT_RT" has been added to the 7.2-stable tree
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
accel/ivpu: Drop IRQF_ONESHOT to allow IPC IRQ threading on PREEMPT_RT
to the 7.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
accel-ivpu-drop-irqf_oneshot-to-allow-ipc-irq-threading-on-preempt_rt.patch
and it can be found in the queue-7.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From 799c8f0b9f3fd728b32594aed3852044703b7e5b Mon Sep 17 00:00:00 2001
From: Karol Wachowski <[email protected]>
Date: Wed, 17 Jun 2026 11:20:31 +0200
Subject: accel/ivpu: Drop IRQF_ONESHOT to allow IPC IRQ threading on PREEMPT_RT
From: Karol Wachowski <[email protected]>
commit 799c8f0b9f3fd728b32594aed3852044703b7e5b upstream.
The IPC RX hardirq handler matches consumers under a spinlock and allocates rx_msg buffers. On PREEMPT_RT these spinlocks become sleeping locks and the allocation may sleep, neither of which is allowed in true hardirq context, resulting in "sleeping function called from invalid context" splats.
IRQF_ONESHOT makes genirq keep the primary handler in hardirq even when forced threading is enabled, so on PREEMPT_RT the handler cannot be threaded. Drop the flag so the primary handler is threaded on PREEMPT_RT and the IPC RX path runs in a context where sleeping is allowed. On the MSI interrupt chip (IRQCHIP_ONESHOT_SAFE) the flag was stripped anyway, so non-RT behaviour is unchanged.
--- drivers/accel/ivpu/ivpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_drv.c +1 -1
@@ -624,7 +624,7 @@ static int ivpu_irq_init(struct ivpu_dev vdev->irq =pci_irq_vector (pdev,0 ); ret =devm_request_threaded_irq (vdev->drm.dev, vdev->irq, ivpu_hw_irq_handler, - ivpu_ipc_irq_thread_handler,IRQF_NO_AUTOEN |IRQF_ONESHOT , + ivpu_ipc_irq_thread_handler,IRQF_NO_AUTOEN ,DRIVER_NAME , vdev);if (ret)ivpu_err (vdev,"Failed to request an IRQ %d\n" , ret);
Patches currently in stable-queue which might be from [email protected] are
queue-7.2/accel-ivpu-use-threaded-irq-for-ipc-callback-processing.patch queue-7.2/accel-ivpu-drop-irqf_oneshot-to-allow-ipc-irq-threading-on-preempt_rt.patch queue-7.2/accel-ivpu-use-separate-flag-for-job-timeout.patch