Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: Mark CPU0 driver with CPUFREQ_NEED_INITIAL_FREQ_CHECK flag

Sometimes boot loaders set CPU frequency to a value outside of frequency table
present with cpufreq core. In such cases CPU might be unstable if it has to run
on that frequency for long duration of time and so its better to set it to a
frequency which is specified in frequency table.

Sachin recently found this problem with cpufreq-cpu0 driver when he was testing
it for Exynos.

Set this flag for cpufreq-cpu0 driver.

Reported-and-tested-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
93575b75 c8ae481b

+1 -1
+1 -1
drivers/cpufreq/cpufreq-cpu0.c
··· 104 104 } 105 105 106 106 static struct cpufreq_driver cpu0_cpufreq_driver = { 107 - .flags = CPUFREQ_STICKY, 107 + .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK, 108 108 .verify = cpufreq_generic_frequency_table_verify, 109 109 .target_index = cpu0_set_target, 110 110 .get = cpufreq_generic_get,