On 11/10/2026 5:15 AM, Karol Wachowski wrote:
An error IRQ that fires after ivpu_boot() enables interrupts queues
recovery_work during probe. If probe then fails, the device is torn
down while the work runs, and the work faults on the unmapped BARs:

   BUG: unable to handle page fault for address: ffffcfc6680200f4
   Workqueue: events_unbound ivpu_pm_recovery_work [intel_vpu]
   RIP: 0010:ivpu_hw_ip_ipc_rx_addr_get+0xc/0xb0 [intel_vpu]
   Call Trace:
    ivpu_wait_for_ready+0x155/0x220 [intel_vpu]
    ivpu_boot+0x9e/0x270 [intel_vpu]
    ivpu_resume+0xa4/0xd0 [intel_vpu]
    ivpu_pm_reset_complete+0x2c/0x90 [intel_vpu]
    ivpu_pm_recovery_work+0xf6/0x140 [intel_vpu]

If probe succeeds, the recovery runs concurrently with the rest of
probe, and its pm_runtime_disable() discards the initial autosuspend
request, leaving the NPU active until first use. Any recovery that
starts while the NPU is idle loses the pending autosuspend the same way.

Keep recovery_work disabled from ivpu_pm_init() until ivpu_pm_enable().
A trigger during probe still runs diagnostics and masks interrupts, and
ivpu_pm_enable() runs the deferred recovery before the initial
autosuspend request. A trigger racing with ivpu_pm_enable() can cause
a second, harmless recovery. Request autosuspend at the end of
ivpu_pm_reset_complete() so the NPU suspends again after every reset.

Fixes: 852be13f3bd3 ("accel/ivpu: Add PM support")
Cc: [email protected]
Reported-by: Daksh Sahni <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jeff Hugo <[email protected]>

Reply via email to