Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/lenb/linux-acpi-2.6
  • Loading branch information
Linus Torvalds committed Dec 21, 2005
2 parents b05948d + 5b2db36 commit bee5ab3
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,19 @@ static void acpi_processor_idle(void)
}
}

cx->usage++;

#ifdef CONFIG_HOTPLUG_CPU
/*
* Check for P_LVL2_UP flag before entering C2 and above on
* an SMP system. We do it here instead of doing it at _CST/P_LVL
* 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:
* ------
Expand Down Expand Up @@ -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?
* ----------
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit bee5ab3

Please sign in to comment.