diff options
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 7 | ||||
-rw-r--r-- | drivers/cpuidle/governors/ladder.c | 5 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index d2fabe7863a9..2a98d99cbd46 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/notifier.h> | 14 | #include <linux/notifier.h> |
15 | #include <linux/latency.h> | 15 | #include <linux/pm_qos_params.h> |
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/cpuidle.h> | 17 | #include <linux/cpuidle.h> |
18 | 18 | ||
@@ -265,7 +265,10 @@ static struct notifier_block cpuidle_latency_notifier = { | |||
265 | .notifier_call = cpuidle_latency_notify, | 265 | .notifier_call = cpuidle_latency_notify, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | #define latency_notifier_init(x) do { register_latency_notifier(x); } while (0) | 268 | static inline void latency_notifier_init(struct notifier_block *n) |
269 | { | ||
270 | pm_qos_add_notifier(PM_QOS_CPU_DMA_LATENCY, n); | ||
271 | } | ||
269 | 272 | ||
270 | #else /* CONFIG_SMP */ | 273 | #else /* CONFIG_SMP */ |
271 | 274 | ||
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index eb666ecae7c9..ba7b9a6b17a1 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/cpuidle.h> | 16 | #include <linux/cpuidle.h> |
17 | #include <linux/latency.h> | 17 | #include <linux/pm_qos_params.h> |
18 | #include <linux/moduleparam.h> | 18 | #include <linux/moduleparam.h> |
19 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
20 | 20 | ||
@@ -81,7 +81,8 @@ static int ladder_select_state(struct cpuidle_device *dev) | |||
81 | /* consider promotion */ | 81 | /* consider promotion */ |
82 | if (last_idx < dev->state_count - 1 && | 82 | if (last_idx < dev->state_count - 1 && |
83 | last_residency > last_state->threshold.promotion_time && | 83 | last_residency > last_state->threshold.promotion_time && |
84 | dev->states[last_idx + 1].exit_latency <= system_latency_constraint()) { | 84 | dev->states[last_idx + 1].exit_latency <= |
85 | pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) { | ||
85 | last_state->stats.promotion_count++; | 86 | last_state->stats.promotion_count++; |
86 | last_state->stats.demotion_count = 0; | 87 | last_state->stats.demotion_count = 0; |
87 | if (last_state->stats.promotion_count >= last_state->threshold.promotion_count) { | 88 | if (last_state->stats.promotion_count >= last_state->threshold.promotion_count) { |
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 299d45c3bdd2..78d77c5dc35c 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/cpuidle.h> | 10 | #include <linux/cpuidle.h> |
11 | #include <linux/latency.h> | 11 | #include <linux/pm_qos_params.h> |
12 | #include <linux/time.h> | 12 | #include <linux/time.h> |
13 | #include <linux/ktime.h> | 13 | #include <linux/ktime.h> |
14 | #include <linux/hrtimer.h> | 14 | #include <linux/hrtimer.h> |
@@ -48,7 +48,7 @@ static int menu_select(struct cpuidle_device *dev) | |||
48 | break; | 48 | break; |
49 | if (s->target_residency > data->predicted_us) | 49 | if (s->target_residency > data->predicted_us) |
50 | break; | 50 | break; |
51 | if (s->exit_latency > system_latency_constraint()) | 51 | if (s->exit_latency > pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY)) |
52 | break; | 52 | break; |
53 | } | 53 | } |
54 | 54 | ||