diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-12-13 11:56:13 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-12-27 13:02:08 +0300 |
commit | 75a80267410e38ab76c4ceb39753f96d72113781 (patch) | |
tree | 08c172e0d40ae21128686957ec078065ef4bc1d0 /include/linux/cpuidle.h | |
parent | 18734958e9bfbc055805d110a38dc76307eba742 (diff) | |
download | linux-75a80267410e38ab76c4ceb39753f96d72113781.tar.xz |
cpuidle: Allow idle states to be disabled by default
In certain situations it may be useful to prevent some idle states
from being used by default while allowing user space to enable them
later on.
For this purpose, introduce a new state flag, CPUIDLE_FLAG_OFF, to
mark idle states that should be disabled by default, make the core
set CPUIDLE_STATE_DISABLED_BY_USER for those states at the
initialization time and add a new state attribute in sysfs,
"default_status", to inform user space of the initial status of
the given idle state ("disabled" if CPUIDLE_FLAG_OFF is set for it,
"enabled" otherwise).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 1dabe36bd011..ebfb52b3ffbf 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -77,6 +77,7 @@ struct cpuidle_state { #define CPUIDLE_FLAG_COUPLED BIT(1) /* state applies to multiple cpus */ #define CPUIDLE_FLAG_TIMER_STOP BIT(2) /* timer is stopped on this state */ #define CPUIDLE_FLAG_UNUSABLE BIT(3) /* avoid using this state */ +#define CPUIDLE_FLAG_OFF BIT(4) /* disable this state by default */ struct cpuidle_device_kobj; struct cpuidle_state_kobj; |