linux-stable/drivers/mailbox
Björn Ardö 85388026a4 mailbox: forward the hrtimer if not queued and under a lock
[ Upstream commit bca1a10046 ]

This reverts commit c7dacf5b0f,
"mailbox: avoid timer start from callback"

The previous commit was reverted since it lead to a race that
caused the hrtimer to not be started at all. The check for
hrtimer_active() in msg_submit() will return true if the
callback function txdone_hrtimer() is currently running. This
function could return HRTIMER_NORESTART and then the timer
will not be restarted, and also msg_submit() will not start
the timer. This will lead to a message actually being submitted
but no timer will start to check for its compleation.

The original fix that added checking hrtimer_active() was added to
avoid a warning with hrtimer_forward. Looking in the kernel
another solution to avoid this warning is to check hrtimer_is_queued()
before calling hrtimer_forward_now() instead. This however requires a
lock so the timer is not started by msg_submit() inbetween this check
and the hrtimer_forward() call.

Fixes: c7dacf5b0f ("mailbox: avoid timer start from callback")
Signed-off-by: Björn Ardö <bjorn.ardo@axis.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:30:33 +02:00
..
Kconfig mailbox: mediatek: add support for adsp mailbox controller 2022-03-12 19:24:57 -06:00
Makefile mailbox: mediatek: add support for adsp mailbox controller 2022-03-12 19:24:57 -06:00
apple-mailbox.c mailbox: apple: Bind to generic compatibles 2022-01-11 23:47:32 -06:00
arm_mhu.c mailbox: arm_mhu: Remove redundant error printing in mhu_probe() 2021-06-26 11:37:48 -05:00
arm_mhu_db.c mailbox: arm_mhu_db: Remove redundant dev_err call in mhu_db_probe() 2021-04-13 20:07:36 -05:00
arm_mhuv2.c mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer 2021-02-22 13:34:27 -06:00
armada-37xx-rwtm-mailbox.c treewide: change my e-mail address, fix my name 2021-04-09 14:54:23 -07:00
bcm-flexrm-mailbox.c Rework of the MSI interrupt infrastructure: 2022-01-13 09:05:29 -08:00
bcm-pdc-mailbox.c mailbox: bcm-pdc: Remove redundant error printing in pdc_probe() 2021-06-26 11:37:50 -05:00
bcm2835-mailbox.c mailbox: bcm2835: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:48 -05:00
hi3660-mailbox.c mailbox: hi3660: convert struct comments to kernel-doc notation 2022-01-11 23:47:32 -06:00
hi6220-mailbox.c mailbox: hi6220: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
imx-mailbox.c mailbox: imx: support i.MX93 S401 MU 2022-03-12 19:31:09 -06:00
mailbox-altera.c mailbox: altera: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:48 -05:00
mailbox-mpfs.c mailbox: change mailbox-mpfs compatible string 2022-01-11 23:47:33 -06:00
mailbox-sti.c mailbox: sti: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
mailbox-test.c
mailbox-xgene-slimpro.c mailbox: xgene-slimpro: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
mailbox.c mailbox: forward the hrtimer if not queued and under a lock 2022-06-09 10:30:33 +02:00
mailbox.h mailbox: fix various typos in comments 2021-04-13 20:07:35 -05:00
mtk-adsp-mailbox.c mailbox: mediatek: add support for adsp mailbox controller 2022-03-12 19:24:57 -06:00
mtk-cmdq-mailbox.c mailbox: mtk: add missing of_node_put before return 2022-01-11 23:47:33 -06:00
omap-mailbox.c mailbox: omap: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
pcc.c mailbox: pcc: Fix an invalid-load caught by the address sanitizer 2022-06-09 10:30:32 +02:00
pl320-ipc.c mailbox: fix various typos in comments 2021-04-13 20:07:35 -05:00
platform_mhu.c mailbox: platform-mhu: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
qcom-apcs-ipc-mailbox.c mailbox: qcom-apcs-ipc: Add compatible for MSM8976 SoC 2022-03-12 19:22:11 -06:00
qcom-ipcc.c mailbox: qcom-ipcc: Support interrupt wake up from suspend 2022-01-11 23:47:33 -06:00
rockchip-mailbox.c
sprd-mailbox.c mailbox: sprd: Add supplementary inbox support 2021-04-13 20:07:36 -05:00
stm32-ipcc.c mailbox: stm32-ipcc: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
sun6i-msgbox.c mailbox: sun6i: Make use of the helper function devm_platform_ioremap_resource() 2021-10-16 14:39:49 -05:00
tegra-hsp.c mailbox: tegra-hsp: Flush whole channel 2022-03-12 19:20:48 -06:00
ti-msgmgr.c mailbox: ti-msgmgr: Operate mailbox in polled mode during system suspend 2022-03-12 19:33:30 -06:00
zynqmp-ipi-mailbox.c mailbox: zynq: add missing of_node_put before return 2022-01-11 23:47:32 -06:00