diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-10 18:35:29 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-10 18:35:29 -0500 |
| commit | 327adaedf2218b0e318eb393aa79cf2be64c199f (patch) | |
| tree | 957c1e005c256e6c201054328f9ea000428b00c5 /kernel/power | |
| parent | b02f6695f7601c4f8442b9cf4636802e7fa8d550 (diff) | |
PM / QoS: Add no_constraints_value field to struct pm_qos_constraints
Add a new field, no_constraints_value, to struct pm_qos_constraints
representing a list of PM QoS constraint requests to be returned by
pm_qos_get_value() when that list of requests is empty.
That field will be equal to default_value for all of the existing
global PM QoS classes and for the resume latency device PM QoS type,
but it will be different from default_value for the new latency
tolerance device PM QoS type introduced by the next changeset.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
| -rw-r--r-- | kernel/power/qos.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 8dff9b48075a..e23ae38e647f 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c | |||
| @@ -66,6 +66,7 @@ static struct pm_qos_constraints cpu_dma_constraints = { | |||
| 66 | .list = PLIST_HEAD_INIT(cpu_dma_constraints.list), | 66 | .list = PLIST_HEAD_INIT(cpu_dma_constraints.list), |
| 67 | .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, | 67 | .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, |
| 68 | .default_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, | 68 | .default_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, |
| 69 | .no_constraint_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, | ||
| 69 | .type = PM_QOS_MIN, | 70 | .type = PM_QOS_MIN, |
| 70 | .notifiers = &cpu_dma_lat_notifier, | 71 | .notifiers = &cpu_dma_lat_notifier, |
| 71 | }; | 72 | }; |
| @@ -79,6 +80,7 @@ static struct pm_qos_constraints network_lat_constraints = { | |||
| 79 | .list = PLIST_HEAD_INIT(network_lat_constraints.list), | 80 | .list = PLIST_HEAD_INIT(network_lat_constraints.list), |
| 80 | .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, | 81 | .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, |
| 81 | .default_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, | 82 | .default_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, |
| 83 | .no_constraint_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, | ||
| 82 | .type = PM_QOS_MIN, | 84 | .type = PM_QOS_MIN, |
| 83 | .notifiers = &network_lat_notifier, | 85 | .notifiers = &network_lat_notifier, |
| 84 | }; | 86 | }; |
| @@ -93,6 +95,7 @@ static struct pm_qos_constraints network_tput_constraints = { | |||
| 93 | .list = PLIST_HEAD_INIT(network_tput_constraints.list), | 95 | .list = PLIST_HEAD_INIT(network_tput_constraints.list), |
| 94 | .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, | 96 | .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, |
| 95 | .default_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, | 97 | .default_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, |
| 98 | .no_constraint_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, | ||
| 96 | .type = PM_QOS_MAX, | 99 | .type = PM_QOS_MAX, |
| 97 | .notifiers = &network_throughput_notifier, | 100 | .notifiers = &network_throughput_notifier, |
| 98 | }; | 101 | }; |
| @@ -128,7 +131,7 @@ static const struct file_operations pm_qos_power_fops = { | |||
| 128 | static inline int pm_qos_get_value(struct pm_qos_constraints *c) | 131 | static inline int pm_qos_get_value(struct pm_qos_constraints *c) |
| 129 | { | 132 | { |
| 130 | if (plist_head_empty(&c->list)) | 133 | if (plist_head_empty(&c->list)) |
| 131 | return c->default_value; | 134 | return c->no_constraint_value; |
| 132 | 135 | ||
| 133 | switch (c->type) { | 136 | switch (c->type) { |
| 134 | case PM_QOS_MIN: | 137 | case PM_QOS_MIN: |
