linux/drivers/cpuidle
Rafael J. Wysocki d8c216cfa5 cpuidle: Make cpuidle_enable_device() call poll_idle_init()
The following scenario is possible with the current cpuidle code and
the ACPI cpuidle driver:
(1) acpi_processor_cst_has_changed() is called,
(2) cpuidle_disable_device() is called,
(3) cpuidle_remove_state_sysfs() is called to remove the (presumably
    outdated) states info from sysfs,
(3) acpi_processor_get_power_info() is called, the first entry in the
    pr->power.states[] table is filled with zeros,
(4) acpi_processor_setup_cpuidle() is called and it doesn't fill the
    first entry in pr->power.states[],
(5) cpuidle_enable_device() is called,
(6) __cpuidle_register_device() is _not_ called, since the device has
    already been registered,
(7) Consequently, poll_idle_init() is _not_ called either,
(8) cpuidle_add_state_sysfs() is called to create the sysfs attributes
    for the new states and it uses the bogus first table entry from
    acpi_processor_get_power_info() for creating state0.

This problem is avoided if cpuidle_enable_device()
unconditionally calls poll_idle_init().

Reported-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
cc: stable@kernel.org
2011-01-12 12:47:30 -05:00
..
governors cpuidle: Fix typos 2010-09-28 23:30:38 -04:00
cpuidle.c cpuidle: Make cpuidle_enable_device() call poll_idle_init() 2011-01-12 12:47:30 -05:00
cpuidle.h cpuidle: make cpuidle_curr_driver static 2010-05-27 21:06:58 -04:00
driver.c cpuidle: make cpuidle_curr_driver static 2010-05-27 21:06:58 -04:00
governor.c tree-wide: fix typos "aquire" -> "acquire", "cumsumed" -> "consumed" 2009-11-09 09:40:57 +01:00
Kconfig ACPI: CONFIG_CPU_IDLE=ACPI by default 2007-11-19 22:22:37 -05:00
Makefile cpuidle: consolidate 2.6.22 cpuidle branch into one patch 2007-10-10 00:12:41 -04:00
sysfs.c cpuidle: make cpuidle_curr_driver static 2010-05-27 21:06:58 -04:00