提交 3eef2455 编写于 作者: R Rafael J. Wysocki

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
...@@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled) ...@@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled)
int all; int all;
int ret; int ret;
all = coupled->online_count || (coupled->online_count << WAITING_BITS); all = coupled->online_count | (coupled->online_count << WAITING_BITS);
ret = atomic_add_unless(&coupled->ready_waiting_counts, ret = atomic_add_unless(&coupled->ready_waiting_counts,
-MAX_WAITING_CPUS, all); -MAX_WAITING_CPUS, all);
......
...@@ -70,7 +70,7 @@ int cpuidle_play_dead(void) ...@@ -70,7 +70,7 @@ int cpuidle_play_dead(void)
struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices);
struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);
int i, dead_state = -1; int i, dead_state = -1;
int power_usage = -1; int power_usage = INT_MAX;
if (!drv) if (!drv)
return -ENODEV; return -ENODEV;
......
...@@ -235,16 +235,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver); ...@@ -235,16 +235,10 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver);
*/ */
struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev) struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev)
{ {
struct cpuidle_driver *drv;
if (!dev) if (!dev)
return NULL; return NULL;
spin_lock(&cpuidle_driver_lock); return __cpuidle_get_cpu_driver(dev->cpu);
drv = __cpuidle_get_cpu_driver(dev->cpu);
spin_unlock(&cpuidle_driver_lock);
return drv;
} }
EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver); EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver);
......
...@@ -312,7 +312,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) ...@@ -312,7 +312,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
{ {
struct menu_device *data = &__get_cpu_var(menu_devices); struct menu_device *data = &__get_cpu_var(menu_devices);
int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY); int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
int power_usage = -1; int power_usage = INT_MAX;
int i; int i;
int multiplier; int multiplier;
struct timespec t; struct timespec t;
......
...@@ -506,7 +506,7 @@ static int intel_idle_cpuidle_driver_init(void) ...@@ -506,7 +506,7 @@ static int intel_idle_cpuidle_driver_init(void)
if (*cpuidle_state_table[cstate].name == '\0') if (*cpuidle_state_table[cstate].name == '\0')
pr_debug(PREFIX "unaware of model 0x%x" pr_debug(PREFIX "unaware of model 0x%x"
" MWAIT %d please" " MWAIT %d please"
" contact lenb@kernel.org", " contact lenb@kernel.org\n",
boot_cpu_data.x86_model, cstate); boot_cpu_data.x86_model, cstate);
continue; continue;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册