From: Zhang Rui Date: Mon, 11 May 2009 01:36:01 +0000 (+0800) Subject: ACPI processor: reset the throttling state once it's invalid X-Git-Tag: v4.14-rc1~23462^2^7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4973b22aa8c70fe036e3e0039f104cf5bb7fe2b1;p=platform%2Fkernel%2Flinux-rpi.git 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 Tested-by: James Ettle Signed-off-by: Len Brown --- 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) 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; }