Skip to content

Commit

Permalink
ACPI processor: reset the throttling state once it's invalid
Browse files Browse the repository at this point in the history
If the BIOS hands us an invalid throttling state,
write a valid state.

http://bugzilla.kernel.org/show_bug.cgi?id=13259

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: James Ettle <theholyettlz@googlemail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Zhang Rui authored and Len Brown committed May 16, 2009
1 parent 56c213f commit 4973b22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,14 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
ret = acpi_read_throttling_status(pr, &value);
if (ret >= 0) {
state = acpi_get_throttling_state(pr, value);
if (state == -1) {
ACPI_WARNING((AE_INFO,
"Invalid throttling state, reset\n"));
state = 0;
ret = acpi_processor_set_throttling(pr, state);
if (ret)
return ret;
}
pr->throttling.state = state;
}

Expand Down

0 comments on commit 4973b22

Please sign in to comment.