summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-17 01:56:47 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-17 01:56:47 +0100
commit9612a461c1e48f75ca1e1f0faf9c928761baae5b (patch)
tree19b80da3e4cabca51dcbc5a4f7432312ea251351 /drivers/acpi
parent4ff913373a77b99cbe3c5df3c76d2622006200d6 (diff)
parent4955a5412cad83da6e994d939bdb4f7887e4585e (diff)
downloadop-kernel-dev-9612a461c1e48f75ca1e1f0faf9c928761baae5b.zip
op-kernel-dev-9612a461c1e48f75ca1e1f0faf9c928761baae5b.tar.gz
Merge branch 'pm-cpuidle'
* pm-cpuidle: intel_idle: remove superfluous dev->state_count initialization intel_idle: do C1E promotion disable quirk for hotplugged CPUs ACPI / cpuidle: remove dev->state_count setting ACPI / cpuidle: fix max idle state handling with hotplug CPU support POWERPC: pseries: cpuidle: use the common cpuidle_[un]register() routines POWERPC: pseries: cpuidle: remove superfluous dev->state_count initialization ARM: EXYNOS: cpuidle: fix AFTR mode check
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 799644c..1fc455b 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -783,6 +783,13 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
if (unlikely(!pr))
return -EINVAL;
+#ifdef CONFIG_HOTPLUG_CPU
+ if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
+ !pr->flags.has_cst &&
+ !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
+ return acpi_idle_enter_c1(dev, drv, CPUIDLE_DRIVER_STATE_START);
+#endif
+
if (cx->entry_method == ACPI_CSTATE_FFH) {
if (current_set_polling_and_test())
return -EINVAL;
@@ -829,6 +836,13 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
if (unlikely(!pr))
return -EINVAL;
+#ifdef CONFIG_HOTPLUG_CPU
+ if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
+ !pr->flags.has_cst &&
+ !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
+ return acpi_idle_enter_c1(dev, drv, CPUIDLE_DRIVER_STATE_START);
+#endif
+
if (!cx->bm_sts_skip && acpi_idle_bm_check()) {
if (drv->safe_state_index >= 0) {
return drv->states[drv->safe_state_index].enter(dev,
@@ -930,12 +944,6 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
if (!cx->valid)
continue;
-#ifdef CONFIG_HOTPLUG_CPU
- if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
- !pr->flags.has_cst &&
- !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
- continue;
-#endif
per_cpu(acpi_cstate[count], dev->cpu) = cx;
count++;
@@ -943,8 +951,6 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
break;
}
- dev->state_count = count;
-
if (!count)
return -EINVAL;
@@ -985,13 +991,6 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
if (!cx->valid)
continue;
-#ifdef CONFIG_HOTPLUG_CPU
- if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
- !pr->flags.has_cst &&
- !(acpi_gbl_FADT.flags & ACPI_FADT_C2_MP_SUPPORTED))
- continue;
-#endif
-
state = &drv->states[count];
snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
OpenPOWER on IntegriCloud