aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2009-05-10 21:36:01 -0400
committerLen Brown <len.brown@intel.com>2009-05-15 23:21:54 -0400
commit4973b22aa8c70fe036e3e0039f104cf5bb7fe2b1 (patch)
tree7c3540560f5256dbcc76d7f8582bab0815ec3451
parent56c213fa012f2bad9eff908292ff2500f840b020 (diff)
ACPI processor: reset the throttling state once it's invalid
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>
-rw-r--r--drivers/acpi/processor_throttling.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 5f09fb8c0e05..7f16f5f8e7d3 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -838,6 +838,14 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
838 ret = acpi_read_throttling_status(pr, &value); 838 ret = acpi_read_throttling_status(pr, &value);
839 if (ret >= 0) { 839 if (ret >= 0) {
840 state = acpi_get_throttling_state(pr, value); 840 state = acpi_get_throttling_state(pr, value);
841 if (state == -1) {
842 ACPI_WARNING((AE_INFO,
843 "Invalid throttling state, reset\n"));
844 state = 0;
845 ret = acpi_processor_set_throttling(pr, state);
846 if (ret)
847 return ret;
848 }
841 pr->throttling.state = state; 849 pr->throttling.state = state;
842 } 850 }
843 851