]> www.infradead.org Git - users/willy/xarray.git/commit
pmdomain: core: Enable s2idle for CPU PM domains on PREEMPT_RT
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 27 May 2024 14:25:51 +0000 (16:25 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 5 Aug 2024 11:12:04 +0000 (13:12 +0200)
commitd7bdb8e6aabe218fd980768a1486434e42761539
treea04ca728f0b95fa0a8e12fa92aacabebdf2e0cef
parent328fc9b29810819c4496c6e9fd74491ca458045e
pmdomain: core: Enable s2idle for CPU PM domains on PREEMPT_RT

To allow a genpd provider for a CPU PM domain to enter a domain-idle-state
during s2idle on a PREEMPT_RT based configuration, we can't use the regular
spinlock, as they are turned into sleepable locks on PREEMPT_RT.

To address this problem, let's convert into using the raw spinlock, but
only for genpd providers that have the GENPD_FLAG_CPU_DOMAIN bit set. In
this way, the lock can still be acquired/released in atomic context, which
is needed in the idle-path for PREEMPT_RT.

Do note that the genpd power-on/off notifiers may also be fired during
s2idle, but these are already prepared for PREEMPT_RT as they are based on
the raw notifiers. However, consumers of them may need to adopt accordingly
to work properly on PREEMPT_RT.

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-2-ulf.hansson@linaro.org
drivers/pmdomain/core.c
include/linux/pm_domain.h