cpufreq: introduce cpufreq_driver_might_sleep
Some architectures and platforms perform CPU frequency transitions
through a non-blocking method, while some might block or sleep. This
distinction is important when trying to change frequency from interrupt
context or in any other non-interruptable context, such as from the
Linux scheduler.
Describe this distinction with a cpufreq driver flag,
CPUFREQ_DRIVER_WILL_NOT_SLEEP. The default is to not have this flag set,
thus erring on the side of caution.
cpufreq_driver_might_sleep() is also introduced in this patch. Setting
the above flag will allow this function to return false.
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by:
Michael Turquette <mturquette@baylibre.com>
Loading
Please register or sign in to comment