diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-04 17:10:38 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-04 17:10:38 -0500 |
commit | 3eef2455f350708269fe42fab07b8c73efca83dc (patch) | |
tree | 839e3585507d0bcceb8d4bdfff7dad56547fda22 | |
parent | f3fe8bd7b114d88c802616a98a0cf69299c37ed3 (diff) | |
parent | ac34d7c8c87c247db0270285950753da045acaad (diff) |
Merge branch 'pm-cpuidle'
By Sivaram Nair (2) and others
* pm-cpuidle:
cpuidle: fix lock contention in the idle path
intel_idle: pr_debug information need separated
cpuidle / coupled: fix ready counter decrement
cpuidle: Fix finding state with min power_usage
-rw-r--r-- | drivers/cpuidle/coupled.c | 2 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 2 | ||||
-rw-r--r-- | drivers/cpuidle/driver.c | 8 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 2 | ||||
-rw-r--r-- | drivers/idle/intel_idle.c | 2 |
5 files changed, 5 insertions, 11 deletions
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 3265844839b..2a297f86dba 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c | |||
@@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled) | |||
209 | int all; | 209 | int all; |
210 | int ret; | 210 | int ret; |
211 | 211 | ||
212 | all = coupled->online_count || (coupled->online_count << WAITING_BITS); | 212 | all = coupled->online_count | (coupled->online_count << WAITING_BITS); |
213 | ret = atomic_add_unless(&coupled->ready_waiting_counts, | 213 | ret = atomic_add_unless(&coupled->ready_waiting_counts, |
214 | -MAX_WAITING_CPUS, all); | 214 | -MAX_WAITING_CPUS, all); |
215 | 215 | ||
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 8df53dd8dbe..fb4a7dd57f9 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -70,7 +70,7 @@ int cpuidle_play_dead(void) | |||
70 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); | 70 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); |
71 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); | 71 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); |
72 | int i, dead_state = -1; | 72 | int i, dead_state = -1; |
73 | int power_usage = -1; | 73 | int power_usage = INT_MAX; |
74 | 74 | ||
75 | if (!drv) | 75 | if (!drv) |
76 | return -ENODEV; | 76 | return -ENODEV; |
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 3af841fb397..c2b281afe0e 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c | |||
@@ -235,16 +235,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver); | |||
235 | */ | 235 | */ |
236 | struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) | 236 | struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) |
237 | { | 237 | { |
238 | struct cpuidle_driver *drv; | ||
239 | |||
240 | if (!dev) | 238 | if (!dev) |
241 | return NULL; | 239 | return NULL; |
242 | 240 | ||
243 | spin_lock(&cpuidle_driver_lock); | 241 | return __cpuidle_get_cpu_driver(dev->cpu); |
244 | drv = __cpuidle_get_cpu_driver(dev->cpu); | ||
245 | spin_unlock(&cpuidle_driver_lock); | ||
246 | |||
247 | return drv; | ||
248 | } | 242 | } |
249 | EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); | 243 | EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); |
250 | 244 | ||
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index bd40b943b6d..20ea33afdda 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -312,7 +312,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
312 | { | 312 | { |
313 | struct menu_device *data = &__get_cpu_var(menu_devices); | 313 | struct menu_device *data = &__get_cpu_var(menu_devices); |
314 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); | 314 | int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); |
315 | int power_usage = -1; | 315 | int power_usage = INT_MAX; |
316 | int i; | 316 | int i; |
317 | int multiplier; | 317 | int multiplier; |
318 | struct timespec t; | 318 | struct timespec t; |
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index c49c04d9c2b..4ba384f1ab5 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
@@ -506,7 +506,7 @@ static int intel_idle_cpuidle_driver_init(void) | |||
506 | if (*cpuidle_state_table[cstate].name == '\0') | 506 | if (*cpuidle_state_table[cstate].name == '\0') |
507 | pr_debug(PREFIX "unaware of model 0x%x" | 507 | pr_debug(PREFIX "unaware of model 0x%x" |
508 | " MWAIT %d please" | 508 | " MWAIT %d please" |
509 | " contact lenb@kernel.org", | 509 | " contact lenb@kernel.org\n", |
510 | boot_cpu_data.x86_model, cstate); | 510 | boot_cpu_data.x86_model, cstate); |
511 | continue; | 511 | continue; |
512 | } | 512 | } |