Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 253906b2 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Quentin Perret
Browse files

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: default avatarMatthias Kaehlcke <mka@chromium.org>
(Reworked the commit message for android)
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent 9f5e7029
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment