aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/processor_idle.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 83fd1b6c10c4..800f99c4c0ef 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -278,8 +278,6 @@ static void acpi_processor_idle(void)
278 } 278 }
279 } 279 }
280 280
281 cx->usage++;
282
283#ifdef CONFIG_HOTPLUG_CPU 281#ifdef CONFIG_HOTPLUG_CPU
284 /* 282 /*
285 * Check for P_LVL2_UP flag before entering C2 and above on 283 * Check for P_LVL2_UP flag before entering C2 and above on
@@ -287,9 +285,12 @@ static void acpi_processor_idle(void)
287 * detection phase, to work cleanly with logical CPU hotplug. 285 * detection phase, to work cleanly with logical CPU hotplug.
288 */ 286 */
289 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 287 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
290 !pr->flags.has_cst && acpi_fadt.plvl2_up) 288 !pr->flags.has_cst && !acpi_fadt.plvl2_up)
291 cx->type = ACPI_STATE_C1; 289 cx = &pr->power.states[ACPI_STATE_C1];
292#endif 290#endif
291
292 cx->usage++;
293
293 /* 294 /*
294 * Sleep: 295 * Sleep:
295 * ------ 296 * ------
@@ -378,6 +379,15 @@ static void acpi_processor_idle(void)
378 379
379 next_state = pr->power.state; 380 next_state = pr->power.state;
380 381
382#ifdef CONFIG_HOTPLUG_CPU
383 /* Don't do promotion/demotion */
384 if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
385 !pr->flags.has_cst && !acpi_fadt.plvl2_up) {
386 next_state = cx;
387 goto end;
388 }
389#endif
390
381 /* 391 /*
382 * Promotion? 392 * Promotion?
383 * ---------- 393 * ----------
@@ -549,7 +559,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
549 * Check for P_LVL2_UP flag before entering C2 and above on 559 * Check for P_LVL2_UP flag before entering C2 and above on
550 * an SMP system. 560 * an SMP system.
551 */ 561 */
552 if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) 562 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
553 return_VALUE(-ENODEV); 563 return_VALUE(-ENODEV);
554#endif 564#endif
555 565