1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-03-14 22:07:51 +00:00

110 Commits

Author SHA1 Message Date
Punit Agrawal
c7fc01c6b5 module: Add thermal support
Add a thermal module that will allow querying for thermal zones and trip
points in the target. The module allow supports enable/disabling thermal
zones as well as change trip temperatures.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
2015-11-24 11:43:05 +00:00
Patrick Bellasi
701e6adf7a cpufreq: add method to trace current frequencies
This patch add a method which allows to inject into a trace a "cpu_frequency"
event for each CPU reporting the current frequency the CPU is running at.
Such a method could be useful to force report CPUs frequency into a trace
file, for example at tracing start and stop, thus allowing to know always
at which frequency an experiment has been executed.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-16 17:47:58 +00:00
setrofim
f46057f836 Merge pull request #3 from derkling/drk-for-master
Fixes and additions for master
2015-11-13 08:24:09 +00:00
Patrick Bellasi
b598b38f12 cpufreq: add methods to configure all CPUs at once
Sometimes it could be required to change governor or frequency for a all the
online CPUs of a target. This patch provides an utility method to easily
do that using a single method call.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:35:25 +00:00
Patrick Bellasi
4dcb4974e5 cpufreq: add methods to set the governor for a specified set of CPUs
Sometimes it could be required to change the governor for a set of different
CPUs. This patch provides an utility method to easily and achieve that with
a single method call.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:35:25 +00:00
Patrick Bellasi
9c9a74826a cgroups: big refactoring to make it more generic
This patch refactors the CGroup module to support multiple controllers.
The new interface is based on two main classes:

.:: Controller(kind)

    Provides a wrapper class for a CGgroup controller of "kind".
    At module initialization time, all the controller available in the
    system are enumerated and a corresponding controller class created.

    A valid reference to the Controller class for a specific CGroup
    controller can be obtained using the controller(kind) method exposed
    by the module, e.g. to get a reference to the CPUSET controller:
	cpuset = target.cgroups.controller('cpuset')

.:: CGroup(name)

    Provides a wrapper class for a CGroup of "name", i.e. a folder which
    path is "name" relative to the controller mount point.
    At module initialization time, the root control group for each
    controller is created by the controller class.

    A valid reference to a CGroup for a specific controller can be
    obtained using the cgroup(name) method exposed by the controller
    object, e.g. to get a reference to the "/LITTLE" cgroup of the
    cpuset controller:
        cpuset_littles = cpuset.cgroup('/LITTLE')

The CGroup object exposes simple get()/set() methods which allows to
read and configure all the supported attributes of a controller.

For example, to set the "cpus" of a cpuset control group:
       cpuset_littles.set(cpus=[0,1])

NOTE: the set() method accepts a variable list of parameters which name
must match a valid (writable) attribute for that controller.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:20:09 +00:00
Patrick Bellasi
cbe80da3a1 cpufreq: make probing more robust
On some machines, when a different CPUFreq policy could be configured
for each CPU, there is not a top-level 'cpufreq' folder exposed
at top level but just per-CPU ones.

This patch makes the probing for CPUFreq support more robust by checking
on all the supported paths.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
b19d76d4b0 cpufreq: fix probe method to support Intel machine
Recent Intel machines uses the CPUFreq pstate driver, which does not create
the standard "/sys/devices/system/cpu/cpufreq" folder usually created by
other (mostly ARM platform) drivers.

This patch fixes the probe method to check for the propert pstate driver
being available in order to enabled the CPUFreq module.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
7ba791b2a7 hotplug: make hotplug probing more robust
In general it makes not sense to hotplug out all the CPUs of a system, thus
ususally CPU0 is configured as not hot/plugggable.
Definitively, on a single core system it does not make sense to hotpolug out
the only available CPU.

This patch switch to usage of CPU1 for hotplug support probing, which is the
really first one for which enabling hotplug could be useful.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Sergei Trofimov
4e6afe960b devlib initial commit. 2015-10-09 09:30:04 +01:00