]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pmdomain: core: Don't hold the genpd-lock when calling dev_pm_domain_set()
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 27 May 2024 14:25:52 +0000 (16:25 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 5 Aug 2024 11:14:52 +0000 (13:14 +0200)
commitb87eee38605c396f0e1fa435939960e5c6cd41d6
tree501a68ef31f884a95c246ec895128bab89b29c47
parentd7bdb8e6aabe218fd980768a1486434e42761539
pmdomain: core: Don't hold the genpd-lock when calling dev_pm_domain_set()

There is no need to hold the genpd-lock, while assigning the
dev->pm_domain. In fact, it becomes a problem on a PREEMPT_RT based
configuration as the genpd-lock may be a raw spinlock, while the lock
acquired through the call to dev_pm_domain_set() is a regular spinlock.

To fix the problem, let's simply move the calls to dev_pm_domain_set()
outside the genpd-lock.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com> # qcm6490 with PREEMPT_RT set
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240527142557.321610-3-ulf.hansson@linaro.org
drivers/pmdomain/core.c