From da4d10d4e725a88fabc92fbc779fcf127b21db8f Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Fri, 29 Jan 2021 11:37:11 +0000 Subject: [PATCH] fw/rt_config: Avoid querying online cpus if hotplug disabled If the device does not have the hoptplug module installed, avoid unnecessary querying of the device to check the number of cpus which can cause issues with some devices. --- wa/framework/target/runtime_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/target/runtime_config.py b/wa/framework/target/runtime_config.py index c76248d2..bbbccee3 100644 --- a/wa/framework/target/runtime_config.py +++ b/wa/framework/target/runtime_config.py @@ -178,7 +178,7 @@ class HotplugRuntimeConfig(RuntimeConfig): raise TargetError('Target does not appear to support hotplug') def validate_parameters(self): - if len(self.num_cores) == self.target.number_of_cpus: + if self.num_cores and len(self.num_cores) == self.target.number_of_cpus: if all(v is False for v in list(self.num_cores.values())): raise ValueError('Cannot set number of all cores to 0')