From e1fb6cf91132714b169a0b39d29459fd48a5221c Mon Sep 17 00:00:00 2001 From: Valentin Schneider Date: Mon, 2 Sep 2019 12:09:47 +0100 Subject: [PATCH] module/cpufreq: Make use_governor() affect only online CPUs Turns out you can't change cpufreq attributes on an offlined CPU (no big surprise!), so use_governor() will fail if a whole frequency domain has been hotplugged out. Change the default behaviour to only target online CPUs. --- devlib/module/cpufreq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/module/cpufreq.py b/devlib/module/cpufreq.py index 24426fe..32e0ef5 100644 --- a/devlib/module/cpufreq.py +++ b/devlib/module/cpufreq.py @@ -111,7 +111,7 @@ class CpufreqModule(Module): :Keyword Arguments: Governor tunables, See :meth:`set_governor_tunables` """ if not cpus: - cpus = range(self.target.number_of_cpus) + cpus = self.target.list_online_cpus() # Setting a governor & tunables for a cpu will set them for all cpus # in the same clock domain, so only manipulating one cpu per domain