1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

cpufreq: Fixed set_x_for cpus

Fixes issue #98 where the passed `cpus` parameter was ignored when setting the
governor and frequency and set for all cpus instead of those specified in the
passed parameter.
Also fixes kwargs not being correctly passed for governor tunables.
This commit is contained in:
Marc Bonnici 2017-03-17 15:37:45 +00:00
parent 32a975be74
commit b444ae65c9

View File

@ -334,9 +334,8 @@ class CpufreqModule(Module):
:param cpus: The list of CPU for which the governor is to be set. :param cpus: The list of CPU for which the governor is to be set.
""" """
online_cpus = self.target.list_online_cpus() for cpu in cpus:
for cpu in online_cpus: self.set_governor(cpu, governor, **kwargs)
self.set_governor(cpu, governor, kwargs)
def set_frequency_for_cpus(self, cpus, freq, exact=False): def set_frequency_for_cpus(self, cpus, freq, exact=False):
""" """
@ -345,8 +344,7 @@ class CpufreqModule(Module):
:param cpus: The list of CPU for which the frequency has to be set. :param cpus: The list of CPU for which the frequency has to be set.
""" """
online_cpus = self.target.list_online_cpus() for cpu in cpus:
for cpu in online_cpus:
self.set_frequency(cpu, freq, exact) self.set_frequency(cpu, freq, exact)
def set_all_frequencies(self, freq): def set_all_frequencies(self, freq):