Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15125
b: refs/heads/master
c: d3e4cef
h: refs/heads/master
i:
  15123: a0c8fd4
v: v3
  • Loading branch information
Len Brown committed Dec 14, 2005
1 parent 6dc7561 commit 6f3f6e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2
refs/heads/master: d3e4cefc86ce1aefc0e9aebdc56308cb4bd51997
20 changes: 15 additions & 5 deletions trunk/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 6f3f6e8

Please sign in to comment.