1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

TargetManager: Updated to allow failure of onlining cpus

Before performing feature discovery on a device, all cores are attempted to be
onlined, however due to power management on some phones, cores can be immediately
hotplugged out again therefore causing the command to file. This commit now just
logs a message to warn that the online process failed and the information obtained
from a device may be incomplete.
This commit is contained in:
Marc Bonnici 2017-06-13 17:20:49 +01:00
parent d7dcbcae92
commit ec8d75ef4c

View File

@ -9,6 +9,7 @@ from wa.framework.target.info import TargetInfo
from wa.framework.target.runtime_parameter_manager import RuntimeParameterManager
from devlib.utils.misc import memoized
from devlib.exception import TargetError
class TargetManager(object):
@ -39,7 +40,12 @@ class TargetManager(object):
# and restore orignal configuration after completed.
if self.target.has('hotplug'):
online_cpus = self.target.list_online_cpus()
self.target.hotplug.online_all()
try:
self.target.hotplug.online_all()
except TargetError:
msg = 'Failed to online all CPUS - some information may not be '\
'able to be retrieved.'
self.logger.debug(msg)
self.rpm = RuntimeParameterManager(self.target)
all_cpus = set(range(self.target.number_of_cpus))
self.target.hotplug.offline(*all_cpus.difference(online_cpus))