Skip to content

cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT

Bugzilla: https://bugzilla.redhat.com/2173028

Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

commit f9901f64536c39f699e6ed228c5e64e7e7ce8708
Author: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Date: Wed Jan 25 12:34:18 2023 +0100

cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT  

The runtime Power Management of CPU topology is not compatible with  
PREEMPT_RT:  

 1. Core cpuidle path disables IRQs.  
 2. Core cpuidle calls cpuidle-psci.  
 3. cpuidle-psci in __psci_enter_domain_idle_state() calls  
    pm_runtime_put_sync_suspend() and pm_runtime_get_sync() which use  
    spinlocks (which are sleeping on PREEMPT_RT).  

Deep sleep modes are not a priority of Realtime kernels because the  
latencies might become unpredictable.  On the other hand the PSCI CPU  
idle power domain is a parent of other devices and power domain  
controllers, thus it cannot be simply skipped (e.g. on Qualcomm SM8250).  

Disable the idle callbacks in cpuidle-psci and mark the domain as  
always on.  This is a trade-off between making PREEMPT_RT working and  
still having a proper power domain hierarchy in the system.  

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>  
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>  
Tested-by: Adrien Thierry <athierry@redhat.com>  
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>  

Signed-off-by: Radu Rendec rrendec@redhat.com

Merge request reports