1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

LinuxDevice: Now raises an error if trying to hotplug all cores.

Previously this would try to automatically enable an additional core to ensure
that all cores were not hot-plugged, however it would do this unnecessarily if
another core that wasn't the first of its types was already online.
This commit is contained in:
Marc Bonnici 2017-06-12 17:52:33 +01:00
parent 37d99e4a5d
commit 8e94b79ed8

View File

@ -538,8 +538,7 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
# make sure at least one other core is enabled to avoid trying to
# hotplug everything.
for i, c in enumerate(self.core_names):
if c != core:
self.enable_cpu(i)
if c != core and i in self.online_cpus:
break
else: # did not find one
raise ValueError('Cannot hotplug all cpus on the device!')