aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2024-05-27 16:25:51 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2024-08-05 13:12:04 +0200
commitd7bdb8e6aabe218fd980768a1486434e42761539 (patch)
treea04ca728f0b95fa0a8e12fa92aacabebdf2e0cef /include/linux/pm_domain.h
parentpmdomain: amlogic: remove obsolete vpu domain driver (diff)
downloadwireguard-linux-d7bdb8e6aabe218fd980768a1486434e42761539.tar.xz
wireguard-linux-d7bdb8e6aabe218fd980768a1486434e42761539.zip
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
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 858c8e7851fb..b86bb52858ac 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -198,8 +198,11 @@ struct generic_pm_domain {
spinlock_t slock;
unsigned long lock_flags;
};
+ struct {
+ raw_spinlock_t raw_slock;
+ unsigned long raw_lock_flags;
+ };
};
-
};
static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd)