1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

fw/rt_config: Fix validation checks

Remove unnecessary validation checks and fix remaining so they don't fail
under certain combinations of parameters.
This commit is contained in:
Marc Bonnici 2018-06-01 10:47:40 +01:00 committed by setrofim
parent 9035c654bd
commit 2cd355195f

View File

@ -528,12 +528,9 @@ class CpufreqRuntimeConfig(RuntimeConfig):
msg = 'CPU{}: Can\'t set both cpu frequency and maximum frequency' msg = 'CPU{}: Can\'t set both cpu frequency and maximum frequency'
raise ConfigError(msg.format(cpu)) raise ConfigError(msg.format(cpu))
if maxf and minf > maxf: if (maxf and minf) and self._resolve_freq(minf, cpu) > self._resolve_freq(maxf, cpu):
msg = 'CPU{}: min_frequency "{}" cannot be greater than max_frequency "{}"' msg = 'CPU{}: min_frequency "{}" cannot be greater than max_frequency "{}"'
raise ConfigError(msg.format(cpu, minf, maxf)) raise ConfigError(msg.format(cpu, minf, maxf))
if maxf and freq > maxf:
msg = 'CPU{}: cpu frequency "{}" cannot be greater than max_frequency "{}"'
raise ConfigError(msg.format(cpu, freq, maxf))
def commit(self): def commit(self):
for cpu in self.config: for cpu in self.config: