diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index bd069349bcae..2ab3c12b88af 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -640,8 +640,11 @@ static int __init cpufreq_gov_dbs_init(void) | |||
640 | { | 640 | { |
641 | int err; | 641 | int err; |
642 | cputime64_t wall; | 642 | cputime64_t wall; |
643 | u64 idle_time = get_cpu_idle_time_us(smp_processor_id(), &wall); | 643 | u64 idle_time; |
644 | int cpu = get_cpu(); | ||
644 | 645 | ||
646 | idle_time = get_cpu_idle_time_us(cpu, &wall); | ||
647 | put_cpu(); | ||
645 | if (idle_time != -1ULL) { | 648 | if (idle_time != -1ULL) { |
646 | /* Idle micro accounting is supported. Use finer thresholds */ | 649 | /* Idle micro accounting is supported. Use finer thresholds */ |
647 | dbs_tuners_ins.up_threshold = MICRO_FREQUENCY_UP_THRESHOLD; | 650 | dbs_tuners_ins.up_threshold = MICRO_FREQUENCY_UP_THRESHOLD; |