interconnect: qcom: rpmh: fix registration race
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 6 Mar 2023 07:56:38 +0000 (08:56 +0100)
committerGeorgi Djakov <djakov@kernel.org>
Mon, 13 Mar 2023 19:13:48 +0000 (21:13 +0200)
commit74240a5bebd48d8b843c6d0f1acfaa722a5abeb7
tree2dbefa7a324132684f68f43c4c31b3c22a4f3680
parent6570d1d46eeade82965ccc4a3ab7d778898ef4bf
interconnect: qcom: rpmh: fix registration race

The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.

Switch to using the new API where the provider is not registered until
after it has been fully initialised.

Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230306075651.2449-11-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
drivers/interconnect/qcom/icc-rpmh.c