mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-25 05:57:51 +00:00
module/hotplug: Add list_hotpluggable_cpus helper
This is similar to the list_{online/offline}_cpus helpers from Target
This commit is contained in:
parent
63d2fb53fc
commit
66be73be3e
@ -35,6 +35,10 @@ class HotplugModule(Module):
|
|||||||
cpu = 'cpu{}'.format(cpu)
|
cpu = 'cpu{}'.format(cpu)
|
||||||
return target.path.join(cls.base_path, cpu, 'online')
|
return target.path.join(cls.base_path, cpu, 'online')
|
||||||
|
|
||||||
|
def list_hotpluggable_cpus(self):
|
||||||
|
return [cpu for cpu in range(self.target.number_of_cpus)
|
||||||
|
if self.target.file_exists(self._cpu_path(self.target, cpu))]
|
||||||
|
|
||||||
def online_all(self):
|
def online_all(self):
|
||||||
self.target._execute_util('hotplug_online_all', # pylint: disable=protected-access
|
self.target._execute_util('hotplug_online_all', # pylint: disable=protected-access
|
||||||
as_root=self.target.is_rooted)
|
as_root=self.target.is_rooted)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user