aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-12-21 11:05:15 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-21 11:05:15 -0800
commitbee5ab3f572d9499c42e75b958ff7309ff830a13 (patch)
treeec48438ed1a7b3d3794a0a4cc577d0bab69b7f03
parentb05948d9b7167e23af88cc65b9ffa4687eaf1f0d (diff)
parent5b2db367a28c12e8dfd0b404d9ea35e948c5d7b3 (diff)
downloadkernel_samsung_smdk4412-bee5ab3f572d9499c42e75b958ff7309ff830a13.tar.gz
kernel_samsung_smdk4412-bee5ab3f572d9499c42e75b958ff7309ff830a13.tar.bz2
kernel_samsung_smdk4412-bee5ab3f572d9499c42e75b958ff7309ff830a13.zip
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
-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 5f51057518b..807b0df308f 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -274,8 +274,6 @@ static void acpi_processor_idle(void)
}
}
- cx->usage++;
-
#ifdef CONFIG_HOTPLUG_CPU
/*
* Check for P_LVL2_UP flag before entering C2 and above on
@@ -283,9 +281,12 @@ static void acpi_processor_idle(void)
* detection phase, to work cleanly with logical CPU hotplug.
*/
if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
- !pr->flags.has_cst && acpi_fadt.plvl2_up)
- cx->type = ACPI_STATE_C1;
+ !pr->flags.has_cst && !acpi_fadt.plvl2_up)
+ cx = &pr->power.states[ACPI_STATE_C1];
#endif
+
+ cx->usage++;
+
/*
* Sleep:
* ------
@@ -386,6 +387,15 @@ static void acpi_processor_idle(void)
next_state = pr->power.state;
+#ifdef CONFIG_HOTPLUG_CPU
+ /* Don't do promotion/demotion */
+ if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
+ !pr->flags.has_cst && !acpi_fadt.plvl2_up) {
+ next_state = cx;
+ goto end;
+ }
+#endif
+
/*
* Promotion?
* ----------
@@ -557,7 +567,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
* Check for P_LVL2_UP flag before entering C2 and above on
* an SMP system.
*/
- if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up)
+ if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
return_VALUE(-ENODEV);
#endif