Skip to contentSkip to conversation

ACPI processor: reset the throttling state once it's invalid

PATCH Applied Zhang Rui 2 participants 2 messages May 11, 2009 – May 16, 2009 ACPI

lore
Share & tools
lore

Zhang Rui

author
#0 lore raw

PATCH 2/2 ACPI processor: reset the throttling state once it's invalid

Reset the throttling state once we find that it's invalid.
http://bugzilla.kernel.org/show_bug.cgi?id=13259

---
 drivers/acpi/processor_throttling.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/processor_throttling.c +8 -0
Index: linux-2.6/drivers/acpi/processor_throttling.c
===================================================================
@@ -840,6 +840,14 @@ static int acpi_processor_get_throttling
 	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;
 	}
 
reviewer Applied
#1 lore raw

applied

thanks,
Len Brown, Intel Open Source Technology Center