[PATCH 1/2] Get power info before updating the C-states

From: Thomas Schlichter
Date: Sun Sep 02 2012 - 08:35:34 EST


acpi_processor_get_power_info() has to be called before
acpi_processor_setup_cpuidle_states() to have the latest
information available. This fixes the missing C-state information
after AC-->DC transition.

Signed-off-by: Thomas Schlichter <thomas.schlichter@xxxxxx>
---
drivers/acpi/processor_idle.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f1a5da4..17ed60b 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1149,6 +1149,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
}

/* Populate Updated C-state information */
+ acpi_processor_get_power_info(pr);
acpi_processor_setup_cpuidle_states(pr);

/* Enable all cpuidle devices */
--
1.7.10.4

--nextPart1794952.WA51hkzRQo
Content-Disposition: inline; filename="0002-cpuidle-Initialize-power_usage-for-all-C-states.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="utf-8"; name="0002-cpuidle-Initialize-power_usage-for-all-C-states.patch"