cpuidle: allow governor switch on cpuidle_register_driver()
The recently introduced haltpoll driver is largely only useful with haltpoll governor. To allow drivers to associate with a particular idle behaviour, add a @governor property to 'struct cpuidle_driver' and thus allow a cpuidle driver to switch to a *preferred* governor on idle driver registration. We save the previous governor, and when an idle driver is unregistered we switch back to that. The @governor can be overridden by cpuidle.governor= boot param or alternatively be ignored if the governor doesn't exist. Signed-off-by:Joao Martins <joao.m.martins@oracle.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
- drivers/cpuidle/cpuidle.h 2 additions, 0 deletionsdrivers/cpuidle/cpuidle.h
- drivers/cpuidle/driver.c 25 additions, 0 deletionsdrivers/cpuidle/driver.c
- drivers/cpuidle/governor.c 4 additions, 3 deletionsdrivers/cpuidle/governor.c
- include/linux/cpuidle.h 3 additions, 0 deletionsinclude/linux/cpuidle.h
Please register or sign in to comment