linux-stable/drivers/pmdomain
Eugen Hristev f83b9abee9 pmdomain: mediatek: fix race conditions with genpd
commit c41336f4d6 upstream.

If the power domains are registered first with genpd and *after that*
the driver attempts to power them on in the probe sequence, then it is
possible that a race condition occurs if genpd tries to power them on
in the same time.
The same is valid for powering them off before unregistering them
from genpd.
Attempt to fix race conditions by first removing the domains from genpd
and *after that* powering down domains.
Also first power up the domains and *after that* register them
to genpd.

Fixes: 59b644b01c ("soc: mediatek: Add MediaTek SCPSYS power domains")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231225133615.78993-1-eugen.hristev@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:25:07 +01:00
..
actions
amlogic pmdomain: amlogic: Fix mask for the second NNA mem PD domain 2023-11-28 17:20:00 +00:00
apple
bcm pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable 2023-11-28 17:19:59 +00:00
imx pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:20:00 +00:00
mediatek pmdomain: mediatek: fix race conditions with genpd 2024-02-23 09:25:07 +01:00
qcom
renesas
rockchip
samsung
st
starfive
sunxi
tegra
ti
xilinx
Makefile