aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-12-05 17:08:40 -0500
committerLen Brown <len.brown@intel.com>2005-12-05 17:08:40 -0500
commit927fe18397b3b1194a5b26b1d388d97e391e5fd2 (patch)
treef04da374e2f38adf85dd26a6accb73d95a90c912 /drivers/acpi
parente4f5c82a92c2a546a16af1614114eec19120e40a (diff)
parent1e483969930a82e16767884449f3a121a817ef00 (diff)
Pull 5165 into release branch
Diffstat (limited to 'drivers/acpi')
-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 5f51057518b0..807b0df308f1 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -274,8 +274,6 @@ static void acpi_processor_idle(void)
274 } 274 }
275 } 275 }
276 276
277 cx->usage++;
278
279#ifdef CONFIG_HOTPLUG_CPU 277#ifdef CONFIG_HOTPLUG_CPU
280 /* 278 /*
281 * Check for P_LVL2_UP flag before entering C2 and above on 279 * Check for P_LVL2_UP flag before entering C2 and above on
@@ -283,9 +281,12 @@ static void acpi_processor_idle(void)
283 * detection phase, to work cleanly with logical CPU hotplug. 281 * detection phase, to work cleanly with logical CPU hotplug.
284 */ 282 */
285 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 283 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
286 !pr->flags.has_cst && acpi_fadt.plvl2_up) 284 !pr->flags.has_cst && !acpi_fadt.plvl2_up)
287 cx->type = ACPI_STATE_C1; 285 cx = &pr->power.states[ACPI_STATE_C1];
288#endif 286#endif
287
288 cx->usage++;
289
289 /* 290 /*
290 * Sleep: 291 * Sleep:
291 * ------ 292 * ------
@@ -386,6 +387,15 @@ static void acpi_processor_idle(void)
386 387
387 next_state = pr->power.state; 388 next_state = pr->power.state;
388 389
390#ifdef CONFIG_HOTPLUG_CPU
391 /* Don't do promotion/demotion */
392 if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
393 !pr->flags.has_cst && !acpi_fadt.plvl2_up) {
394 next_state = cx;
395 goto end;
396 }
397#endif
398
389 /* 399 /*
390 * Promotion? 400 * Promotion?
391 * ---------- 401 * ----------
@@ -557,7 +567,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
557 * Check for P_LVL2_UP flag before entering C2 and above on 567 * Check for P_LVL2_UP flag before entering C2 and above on
558 * an SMP system. 568 * an SMP system.
559 */ 569 */
560 if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) 570 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
561 return_VALUE(-ENODEV); 571 return_VALUE(-ENODEV);
562#endif 572#endif
563 573