+2
-6
drivers/cpufreq/cpufreq_governor.c
+2
-6
drivers/cpufreq/cpufreq_governor.c
···
193
193
wall_time = cur_wall_time - j_cdbs->prev_cpu_wall;
194
194
j_cdbs->prev_cpu_wall = cur_wall_time;
195
195
196
-
if (cur_idle_time <= j_cdbs->prev_cpu_idle) {
197
-
idle_time = 0;
198
-
} else {
199
-
idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
200
-
j_cdbs->prev_cpu_idle = cur_idle_time;
201
-
}
196
+
idle_time = cur_idle_time - j_cdbs->prev_cpu_idle;
197
+
j_cdbs->prev_cpu_idle = cur_idle_time;
202
198
203
199
if (ignore_nice) {
204
200
u64 cur_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE];
+5
drivers/cpufreq/intel_pstate.c
+5
drivers/cpufreq/intel_pstate.c
···
813
813
if (err)
814
814
goto skip_tar;
815
815
816
+
/* For level 1 and 2, bits[23:16] contain the ratio */
817
+
if (tdp_ctrl)
818
+
tdp_ratio >>= 16;
819
+
820
+
tdp_ratio &= 0xff; /* ratios are only 8 bits long */
816
821
if (tdp_ratio - 1 == tar) {
817
822
max_pstate = tar;
818
823
pr_debug("max_pstate=TAC %x\n", max_pstate);