ANDROID: thermal: cpu_cooling: Use related_cpus for energy model cpumask check
With CONFIG_ENERGY_MODEL=y the registration of a CPU cooling device fails if the cpumask of the energy model doesn't match policy->cpus (CPUs of the policy that are currently online). For cheza this succeeds at boot, however it fails on resume when the cooling device for CPU4 is registered. At this time only the first core of the gold cluster is online (cpumask 0x10), however the cpumask of the energy model includes all cores of the cluster (cpumask 0xf0). Change the check to use policy->related_cpus, which includes the CPUs that are currently offline. Bug: 120440300 Change-Id: I3465c4085ca2ea8a8fcafd04e2d708c74234ecee Test: On hikey960 /sys/class/thermal/cooling_device1 exists despite plugging all the CPUs of policy4 off then back in Fixes: 2054105d ("ANDROID: thermal: cpu_cooling: Migrate to using the EM framework") Signed-off-by:Matthias Kaehlcke <mka@chromium.org> (Reworked the commit message for android) Signed-off-by:
Quentin Perret <quentin.perret@arm.com>
Loading
Please register or sign in to comment