Re: [PATCH] media: renesas: rzv2h-ivc: stop interrupt before disabling clocks on suspend

From: Yaohan Li

Date: Thu Dec 03 2026 - 23:21:24 EST


Hi Jacopo,

On Thu, Dec 03, 2026 at 10:19:22AM +0100, Jacopo Mondi wrote:
> On Thu, Dec 03, 2026 at 04:53:19PM +0800, Yaohan Li wrote:
> > rzv2h_ivc_runtime_suspend() tears these down in the wrong order: it
> > asserts resets and disables all three clocks while RZV2H_IVC_REG_FM_INT_EN
> > is still enabled and before calling free_irq(). If an interrupt arrives
>
> How can an interrupt arrive ater the reset signal has been asserted ?

You're right -- saying a new interrupt could arrive after reset was
imprecise.

My concern is an interrupt handler that is already running on another CPU
when runtime_suspend() asserts the resets and disables the clocks. Since
free_irq() currently runs after both, nothing waits for an in-flight
handler before the clocks are gated.

Also, the driver gets shared resets via
devm_reset_control_bulk_get_optional_shared(), so asserting them does not
necessarily assert the physical reset line if another consumer still holds
it deasserted.

My QEMU test only checks the teardown order, not real RZ/V2H interrupt
behavior. Does the streaming stop path already guarantee that no handler
can still be running when runtime_suspend() is entered?

Thanks,
Yaohan