[PATCH v2 0/3] Fix sleeping function called from invalid context
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Fri Sep 5 02:15:09 PDT 2025
Il 29/08/25 11:15, Jason-JH Lin ha scritto:
> We found that there is a spin_lock_irqsave protection in msg_submit()
> of mailbox.c and it is in the atomic context.
> So when the mailbox controller driver calls pm_runtime_get_sync() in
> mbox_chan_ops->send_data(), it will get this BUG report.
> "BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1164"
>
> Additionally, pm_runtime_put_autosuspend() should be invoked from the
> GCE IRQ handler to ensure the hardware has actually completed its work.
>
> To resolve these issues, remove the pm_runtime calls from
> cmdq_mbox_send_data() and delegate power management responsibilities
> to the client driver.
> ---
> Changes in v2:
> - Move pm_runtmie APIs from cmdq driver to client drivers.
> - Move pm_runtime_put_autosuspend to GCE irq callback function.
> - Link to v1: https://lore.kernel.org/r/20240614040133.24967-1-jason-jh.lin@mediatek.com
For the entire series:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list