sst-linux/drivers/mailbox
Pekka Pessi 3d725abdfd mailbox: tegra-hsp: Clear mailbox before using message
commit 0b7f8328f988178b55ee11d772a6e1238c04d29d upstream.

The Tegra RCE (Camera) driver expects the mailbox to be empty before
processing the IVC messages. On RT kernel, the threads processing the
IVC messages (which are invoked after `mbox_chan_received_data()` is
called) may be on a different CPU or running with a higher priority
than the HSP interrupt handler thread. This can cause it to act on the
message before the mailbox gets cleared in the HSP interrupt handler
resulting in a loss of IVC notification.

Fix this by clearing the mailbox data register before calling
`mbox_chan_received_data()`.

Fixes: 8f585d1403 ("mailbox: tegra-hsp: Add tegra_hsp_sm_ops")
Fixes: 74c20dd0f8 ("mailbox: tegra-hsp: Add 128-bit shared mailbox support")
Cc: stable@vger.kernel.org
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-21 13:49:51 +01:00
..
apple-mailbox.c
arm_mhu_db.c
arm_mhu.c
arm_mhuv2.c mailbox: arm_mhuv2: clean up loop in get_irq_chan_comb() 2024-12-14 19:53:43 +01:00
armada-37xx-rwtm-mailbox.c
bcm2835-mailbox.c
bcm-flexrm-mailbox.c
bcm-pdc-mailbox.c
hi3660-mailbox.c
hi6220-mailbox.c
imx-mailbox.c
Kconfig
mailbox-altera.c
mailbox-mpfs.c
mailbox-sti.c
mailbox-test.c
mailbox-xgene-slimpro.c
mailbox.c
mailbox.h
Makefile
mtk-adsp-mailbox.c
mtk-cmdq-mailbox.c mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable() 2024-12-14 19:53:54 +01:00
omap-mailbox.c
pcc.c
pl320-ipc.c
platform_mhu.c
qcom-apcs-ipc-mailbox.c
qcom-ipcc.c
rockchip-mailbox.c
sprd-mailbox.c
stm32-ipcc.c
sun6i-msgbox.c
tegra-hsp.c mailbox: tegra-hsp: Clear mailbox before using message 2025-02-21 13:49:51 +01:00
ti-msgmgr.c
zynqmp-ipi-mailbox.c