]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc/mtk_scp: Move clk ops outside send_lock
authorChen-Yu Tsai <wenst@chromium.org>
Wed, 4 Jan 2023 08:31:10 +0000 (16:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:26 +0000 (09:34 +0100)
commit3291a9fb74a044f95c068271d6cd2641807c7f66
tree488c0c02db639861a66ad886d344e8a32055d067
parent108511e1611c30690f3541be1481c7ab94816afc
remoteproc/mtk_scp: Move clk ops outside send_lock

commit 1e368ae38dde71507a1511cf36229fcd70982242 upstream.

Clocks are properly reference counted and do not need to be inside the
lock range.

Right now this triggers a false-positive lockdep warning on MT8192 based
Chromebooks, through a combination of mtk-scp that has a cros-ec-rpmsg
sub-device, the (actual) cros-ec I2C adapter registration, I2C client
(not on cros-ec) probe doing i2c transfers and enabling clocks.

This is a false positive because the cros-ec-rpmsg under mtk-scp does
not have an I2C adapter, and also each I2C adapter and cros-ec instance
have their own mutex.

Move the clk operations outside of the send_lock range.

Fixes: 7cca6d2e214d ("remoteproc/mediatek: add SCP support for mt8183")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230104083110.736377-1-wenst@chromium.org
[Fixed "Fixes:" tag line]
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/remoteproc/mtk_scp_ipi.c