diff options
author | Jean Pihet <j-pihet@ti.com> | 2012-02-22 22:47:42 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-06-22 09:22:40 +0800 |
commit | f6cd002148e6f1b2d08ffd39f0acfcc9a2b29c21 (patch) | |
tree | 4885af255cfd8ce15edfc40b0a3c142ea214326f /kernel | |
parent | d9c9cd6550d251d4108a1a58d7bf24132a037097 (diff) | |
download | panda-f6cd002148e6f1b2d08ffd39f0acfcc9a2b29c21.tar.gz |
PM QoS: add a PM_QOS_MEMORY_THROUGHPUT class
Provide a memory or SDMA throughput constraints class,
which can be applied to the low level platform code using the
callback notification mechanism and
also a MISC /dev entry for the constraints from user space.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/qos.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 6a031e68402..4f163fae510 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -86,6 +86,18 @@ static struct pm_qos_object network_lat_pm_qos = { .name = "network_latency", }; +static BLOCKING_NOTIFIER_HEAD(memory_throughput_notifier); +static struct pm_qos_constraints memory_tput_constraints = { + .list = PLIST_HEAD_INIT(memory_tput_constraints.list), + .target_value = PM_QOS_MEMORY_THROUGHPUT_DEFAULT_VALUE, + .default_value = PM_QOS_MEMORY_THROUGHPUT_DEFAULT_VALUE, + .type = PM_QOS_MAX, + .notifiers = &memory_throughput_notifier, +}; +static struct pm_qos_object memory_throughput_pm_qos = { + .constraints = &memory_tput_constraints, + .name = "memory_throughput", +}; static BLOCKING_NOTIFIER_HEAD(network_throughput_notifier); static struct pm_qos_constraints network_tput_constraints = { @@ -105,6 +117,7 @@ static struct pm_qos_object *pm_qos_array[] = { &null_pm_qos, &cpu_dma_pm_qos, &network_lat_pm_qos, + &memory_throughput_pm_qos, &network_throughput_pm_qos }; @@ -531,6 +544,14 @@ static int __init pm_qos_power_init(void) return ret; } } + ret = register_pm_qos_misc(&memory_throughput_pm_qos); + if (ret < 0) + printk(KERN_ERR + "pm_qos_param: memory_throughput setup failed\n"); + ret = register_pm_qos_misc(&network_throughput_pm_qos); + if (ret < 0) + printk(KERN_ERR + "pm_qos_param: network_throughput setup failed\n"); return ret; } |