aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2014-03-17 12:17:30 +0100
committerRobin Randhawa <robin.randhawa@arm.com>2015-04-09 12:26:02 +0100
commitaac7a83f922764ac503687006851c669c4d6b4de (patch)
tree607b0cf80300974c8be58934405f25cc784528e1 /drivers
parent98324e54fe37bad44b0cd59212891b55777509eb (diff)
cpuidle: sysfs: Export target residency information
From user space, there is no way to know the target residency for each idle state. If we want to write tools to measure the accuracy of the idle state selection from the governor, we need this info. As the exit latency is exported through sysfs, exporting the target residency in the same place makes sense. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit 9bc0482feae8763447746c89fd971704c819b52e) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpuidle/sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index e918b6d0caf7..efe2f175168f 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -293,6 +293,7 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, \
}
define_show_state_function(exit_latency)
+define_show_state_function(target_residency)
define_show_state_function(power_usage)
define_show_state_ull_function(usage)
define_show_state_ull_function(time)
@@ -304,6 +305,7 @@ define_store_state_ull_function(disable)
define_one_state_ro(name, show_state_name);
define_one_state_ro(desc, show_state_desc);
define_one_state_ro(latency, show_state_exit_latency);
+define_one_state_ro(residency, show_state_target_residency);
define_one_state_ro(power, show_state_power_usage);
define_one_state_ro(usage, show_state_usage);
define_one_state_ro(time, show_state_time);
@@ -313,6 +315,7 @@ static struct attribute *cpuidle_state_default_attrs[] = {
&attr_name.attr,
&attr_desc.attr,
&attr_latency.attr,
+ &attr_residency.attr,
&attr_power.attr,
&attr_usage.attr,
&attr_time.attr,