diff --git a/wa/framework/target/runtime_config.py b/wa/framework/target/runtime_config.py index bbbccee3c..760ea312b 100644 --- a/wa/framework/target/runtime_config.py +++ b/wa/framework/target/runtime_config.py @@ -306,13 +306,16 @@ def set_governor_tunables(obj, value, core): @staticmethod def set_param(obj, value, core, parameter): - '''Method to store passed parameter if it is not already specified for that cpu''' - cpus = resolve_unique_domain_cpus(core, obj.target) - for cpu in cpus: - if parameter in obj.config[cpu]: - msg = 'Cannot set "{}" for core "{}"; Parameter for CPU{} has already been set' - raise ConfigError(msg.format(parameter, core, cpu)) - obj.config[cpu][parameter] = value + '''Method to store passed parameter if it is not already specified for that cpu frequency domain''' + domain_cpus = resolve_unique_domain_cpus(core, obj.target) + for domain_cpu in domain_cpus: + cpus = obj.target.cpufreq.get_related_cpus(domain_cpu) + for cpu in cpus: + if cpu in obj.config and parameter in obj.config[cpu]: + msg = 'Cannot set "{}" for core "{}"; Parameter for CPU{} has already been set' + raise ConfigError(msg.format(parameter, core, cpu)) + # Once validated, store the ID of the first cpu resolved. + obj.config[cpus[0]][parameter] = value def __init__(self, target): self.config = defaultdict(dict) diff --git a/wa/utils/misc.py b/wa/utils/misc.py index beea6b104..4e06ee7b7 100644 --- a/wa/utils/misc.py +++ b/wa/utils/misc.py @@ -641,7 +641,7 @@ def resolve_unique_domain_cpus(name, target): # Skip core if not online continue if domain_cpus[0] not in unique_cpus: - unique_cpus.append(domain_cpus[0]) + unique_cpus.append(cpu) return unique_cpus