On 10/17/2012 12:31 PM, Daniel Lezcano wrote: > On 10/17/2012 12:39 AM, Julius Werner wrote: >> When cpuidle drivers do not supply explicit power_usage values, >> cpuidle/driver.c inserts dummy values instead. When a running processor >> dynamically gains new C-states (e.g. after ACPI events), the power_usage >> values of those states will stay uninitialized, and cpuidle governors >> will never choose to enter them. >> >> This patch moves the dummy value initialization from >> cpuidle_register_driver to cpuidle_enable_device, which drivers such as >> acpi/processor_idle.c will call again when they add or remove C-states. >> Tested and verified on an Acer AC700 Chromebook, which supports the C3 >> state only when it switches from AC to battery power. >> >> Signed-off-by: Julius Werner <jwer...@chromium.org> >> --- > This is specific to the acpi and should be handled in the > processor_idle.c file instead of the cpuidle core code. > > Could be the function 'acpi_processor_cst_has_changed' the right place > to set a dummy power value for the power in the new C-state ?
btw, good catch ! :) -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev