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

Configure Feed

Select the types of activity you want to include in your feed.

Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq

* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Fix up whitespace in conservative governor.
[CPUFREQ] Make cpufreq_conservative handle out-of-sync events properly
[CPUFREQ] architectural pstate driver for powernow-k8

+119 -144
+23 -67
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
··· 46 46 47 47 #define PFX "powernow-k8: " 48 48 #define BFX PFX "BIOS error: " 49 - #define VERSION "version 2.00.00" 49 + #define VERSION "version 2.20.00" 50 50 #include "powernow-k8.h" 51 51 52 52 /* serialize freq changes */ ··· 73 73 return 1000 * find_freq_from_fid(fid); 74 74 } 75 75 76 - /* Return a frequency in MHz, given an input fid and did */ 77 - static u32 find_freq_from_fiddid(u32 fid, u32 did) 76 + static u32 find_khz_freq_from_pstate(struct cpufreq_frequency_table *data, u32 pstate) 78 77 { 79 - if (current_cpu_data.x86 == 0x10) 80 - return 100 * (fid + 0x10) >> did; 81 - else 82 - return 100 * (fid + 0x8) >> did; 78 + return data[pstate].frequency; 83 79 } 84 80 85 - static u32 find_khz_freq_from_fiddid(u32 fid, u32 did) 86 - { 87 - return 1000 * find_freq_from_fiddid(fid, did); 88 - } 89 - 90 - static u32 find_fid_from_pstate(u32 pstate) 91 - { 92 - u32 hi, lo; 93 - rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi); 94 - return lo & HW_PSTATE_FID_MASK; 95 - } 96 - 97 - static u32 find_did_from_pstate(u32 pstate) 98 - { 99 - u32 hi, lo; 100 - rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi); 101 - return (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; 102 - } 103 81 104 82 /* Return the vco fid for an input fid 105 83 * ··· 120 142 if (cpu_family == CPU_HW_PSTATE) { 121 143 rdmsr(MSR_PSTATE_STATUS, lo, hi); 122 144 i = lo & HW_PSTATE_MASK; 123 - rdmsr(MSR_PSTATE_DEF_BASE + i, lo, hi); 124 - data->currfid = lo & HW_PSTATE_FID_MASK; 125 - data->currdid = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; 145 + data->currpstate = i; 126 146 return 0; 127 147 } 128 148 do { ··· 271 295 static int transition_pstate(struct powernow_k8_data *data, u32 pstate) 272 296 { 273 297 wrmsr(MSR_PSTATE_CTRL, pstate, 0); 274 - data->currfid = find_fid_from_pstate(pstate); 298 + data->currpstate = pstate; 275 299 return 0; 276 300 } 277 301 ··· 821 845 static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table) 822 846 { 823 847 int i; 848 + u32 hi = 0, lo = 0; 849 + rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo); 850 + data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT; 824 851 825 852 for (i = 0; i < data->acpi_data.state_count; i++) { 826 853 u32 index; 827 854 u32 hi = 0, lo = 0; 828 - u32 fid; 829 - u32 did; 830 855 831 856 index = data->acpi_data.states[i].control & HW_PSTATE_MASK; 832 - if (index > MAX_HW_PSTATE) { 857 + if (index > data->max_hw_pstate) { 833 858 printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index); 834 859 printk(KERN_ERR PFX "Please report to BIOS manufacturer\n"); 860 + powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; 861 + continue; 835 862 } 836 863 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); 837 864 if (!(hi & HW_PSTATE_VALID_MASK)) { ··· 843 864 continue; 844 865 } 845 866 846 - fid = lo & HW_PSTATE_FID_MASK; 847 - did = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; 867 + powernow_table[i].index = index; 848 868 849 - dprintk(" %d : fid 0x%x, did 0x%x\n", index, fid, did); 850 - 851 - powernow_table[i].index = index | (fid << HW_FID_INDEX_SHIFT) | (did << HW_DID_INDEX_SHIFT); 852 - 853 - powernow_table[i].frequency = find_khz_freq_from_fiddid(fid, did); 854 - 855 - if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { 856 - printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n", 857 - powernow_table[i].frequency, 858 - (unsigned int) (data->acpi_data.states[i].core_frequency * 1000)); 859 - powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; 860 - continue; 861 - } 869 + powernow_table[i].frequency = data->acpi_data.states[i].core_frequency * 1000; 862 870 } 863 871 return 0; 864 872 } ··· 986 1020 /* Take a frequency, and issue the hardware pstate transition command */ 987 1021 static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned int index) 988 1022 { 989 - u32 fid = 0; 990 - u32 did = 0; 991 1023 u32 pstate = 0; 992 1024 int res, i; 993 1025 struct cpufreq_freqs freqs; 994 1026 995 1027 dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); 996 1028 997 - /* get fid did for hardware pstate transition */ 1029 + /* get MSR index for hardware pstate transition */ 998 1030 pstate = index & HW_PSTATE_MASK; 999 - if (pstate > MAX_HW_PSTATE) 1031 + if (pstate > data->max_hw_pstate) 1000 1032 return 0; 1001 - fid = (index & HW_FID_INDEX_MASK) >> HW_FID_INDEX_SHIFT; 1002 - did = (index & HW_DID_INDEX_MASK) >> HW_DID_INDEX_SHIFT; 1003 - freqs.old = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1004 - freqs.new = find_khz_freq_from_fiddid(fid, did); 1033 + freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); 1034 + freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); 1005 1035 1006 1036 for_each_cpu_mask(i, *(data->available_cores)) { 1007 1037 freqs.cpu = i; ··· 1005 1043 } 1006 1044 1007 1045 res = transition_pstate(data, pstate); 1008 - data->currfid = find_fid_from_pstate(pstate); 1009 - data->currdid = find_did_from_pstate(pstate); 1010 - freqs.new = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1046 + freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); 1011 1047 1012 1048 for_each_cpu_mask(i, *(data->available_cores)) { 1013 1049 freqs.cpu = i; ··· 1050 1090 if (query_current_values_with_pending_wait(data)) 1051 1091 goto err_out; 1052 1092 1053 - if (cpu_family == CPU_HW_PSTATE) 1054 - dprintk("targ: curr fid 0x%x, did 0x%x\n", 1055 - data->currfid, data->currdid); 1056 - else { 1093 + if (cpu_family != CPU_HW_PSTATE) { 1057 1094 dprintk("targ: curr fid 0x%x, vid 0x%x\n", 1058 1095 data->currfid, data->currvid); 1059 1096 ··· 1081 1124 mutex_unlock(&fidvid_mutex); 1082 1125 1083 1126 if (cpu_family == CPU_HW_PSTATE) 1084 - pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1127 + pol->cur = find_khz_freq_from_pstate(data->powernow_table, newstate); 1085 1128 else 1086 1129 pol->cur = find_khz_freq_from_fid(data->currfid); 1087 1130 ret = 0; ··· 1180 1223 + (3 * (1 << data->irt) * 10)) * 1000; 1181 1224 1182 1225 if (cpu_family == CPU_HW_PSTATE) 1183 - pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1226 + pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); 1184 1227 else 1185 1228 pol->cur = find_khz_freq_from_fid(data->currfid); 1186 1229 dprintk("policy current frequency %d kHz\n", pol->cur); ··· 1197 1240 cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); 1198 1241 1199 1242 if (cpu_family == CPU_HW_PSTATE) 1200 - dprintk("cpu_init done, current fid 0x%x, did 0x%x\n", 1201 - data->currfid, data->currdid); 1243 + dprintk("cpu_init done, current pstate 0x%x\n", data->currpstate); 1202 1244 else 1203 1245 dprintk("cpu_init done, current fid 0x%x, vid 0x%x\n", 1204 1246 data->currfid, data->currvid); ··· 1253 1297 goto out; 1254 1298 1255 1299 if (cpu_family == CPU_HW_PSTATE) 1256 - khz = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1300 + khz = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); 1257 1301 else 1258 1302 khz = find_khz_freq_from_fid(data->currfid); 1259 1303
+6 -14
arch/x86/kernel/cpu/cpufreq/powernow-k8.h
··· 10 10 11 11 u32 numps; /* number of p-states */ 12 12 u32 batps; /* number of p-states supported on battery */ 13 + u32 max_hw_pstate; /* maximum legal hardware pstate */ 13 14 14 15 /* these values are constant when the PSB is used to determine 15 16 * vid/fid pairings, but are modified during the ->target() call ··· 22 21 u32 plllock; /* pll lock time, units 1 us */ 23 22 u32 exttype; /* extended interface = 1 */ 24 23 25 - /* keep track of the current fid / vid or did */ 26 - u32 currvid, currfid, currdid; 24 + /* keep track of the current fid / vid or pstate */ 25 + u32 currvid, currfid, currpstate; 27 26 28 27 /* the powernow_table includes all frequency and vid/fid pairings: 29 28 * fid are the lower 8 bits of the index, vid are the upper 8 bits. ··· 88 87 89 88 /* Hardware Pstate _PSS and MSR definitions */ 90 89 #define USE_HW_PSTATE 0x00000080 91 - #define HW_PSTATE_FID_MASK 0x0000003f 92 - #define HW_PSTATE_DID_MASK 0x000001c0 93 - #define HW_PSTATE_DID_SHIFT 6 94 90 #define HW_PSTATE_MASK 0x00000007 95 91 #define HW_PSTATE_VALID_MASK 0x80000000 96 - #define HW_FID_INDEX_SHIFT 8 97 - #define HW_FID_INDEX_MASK 0x0000ff00 98 - #define HW_DID_INDEX_SHIFT 16 99 - #define HW_DID_INDEX_MASK 0x00ff0000 100 - #define HW_WATTS_MASK 0xff 101 - #define HW_PWR_DVR_MASK 0x300 102 - #define HW_PWR_DVR_SHIFT 8 103 - #define HW_PWR_MAX_MULT 3 104 - #define MAX_HW_PSTATE 8 /* hw pstate supports up to 8 */ 92 + #define HW_PSTATE_MAX_MASK 0x000000f0 93 + #define HW_PSTATE_MAX_SHIFT 4 105 94 #define MSR_PSTATE_DEF_BASE 0xc0010064 /* base of Pstate MSRs */ 106 95 #define MSR_PSTATE_STATUS 0xc0010063 /* Pstate Status MSR */ 107 96 #define MSR_PSTATE_CTRL 0xc0010062 /* Pstate control MSR */ 97 + #define MSR_PSTATE_CUR_LIMIT 0xc0010061 /* pstate current limit MSR */ 108 98 109 99 /* define the two driver architectures */ 110 100 #define CPU_OPTERON 0
+90 -63
drivers/cpufreq/cpufreq_conservative.c
··· 37 37 #define DEF_FREQUENCY_UP_THRESHOLD (80) 38 38 #define DEF_FREQUENCY_DOWN_THRESHOLD (20) 39 39 40 - /* 41 - * The polling frequency of this governor depends on the capability of 40 + /* 41 + * The polling frequency of this governor depends on the capability of 42 42 * the processor. Default polling frequency is 1000 times the transition 43 - * latency of the processor. The governor will work on any processor with 44 - * transition latency <= 10mS, using appropriate sampling 43 + * latency of the processor. The governor will work on any processor with 44 + * transition latency <= 10mS, using appropriate sampling 45 45 * rate. 46 46 * For CPUs with transition latency > 10mS (mostly drivers 47 47 * with CPUFREQ_ETERNAL), this governor will not work. 48 48 * All times here are in uS. 49 49 */ 50 - static unsigned int def_sampling_rate; 50 + static unsigned int def_sampling_rate; 51 51 #define MIN_SAMPLING_RATE_RATIO (2) 52 52 /* for correct statistics, we need at least 10 ticks between each measure */ 53 53 #define MIN_STAT_SAMPLING_RATE \ ··· 63 63 static void do_dbs_timer(struct work_struct *work); 64 64 65 65 struct cpu_dbs_info_s { 66 - struct cpufreq_policy *cur_policy; 67 - unsigned int prev_cpu_idle_up; 68 - unsigned int prev_cpu_idle_down; 69 - unsigned int enable; 70 - unsigned int down_skip; 71 - unsigned int requested_freq; 66 + struct cpufreq_policy *cur_policy; 67 + unsigned int prev_cpu_idle_up; 68 + unsigned int prev_cpu_idle_down; 69 + unsigned int enable; 70 + unsigned int down_skip; 71 + unsigned int requested_freq; 72 72 }; 73 73 static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); 74 74 ··· 82 82 * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock 83 83 * is recursive for the same process. -Venki 84 84 */ 85 - static DEFINE_MUTEX (dbs_mutex); 85 + static DEFINE_MUTEX (dbs_mutex); 86 86 static DECLARE_DELAYED_WORK(dbs_work, do_dbs_timer); 87 87 88 88 struct dbs_tuners { 89 - unsigned int sampling_rate; 90 - unsigned int sampling_down_factor; 91 - unsigned int up_threshold; 92 - unsigned int down_threshold; 93 - unsigned int ignore_nice; 94 - unsigned int freq_step; 89 + unsigned int sampling_rate; 90 + unsigned int sampling_down_factor; 91 + unsigned int up_threshold; 92 + unsigned int down_threshold; 93 + unsigned int ignore_nice; 94 + unsigned int freq_step; 95 95 }; 96 96 97 97 static struct dbs_tuners dbs_tuners_ins = { 98 - .up_threshold = DEF_FREQUENCY_UP_THRESHOLD, 99 - .down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD, 100 - .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR, 101 - .ignore_nice = 0, 102 - .freq_step = 5, 98 + .up_threshold = DEF_FREQUENCY_UP_THRESHOLD, 99 + .down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD, 100 + .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR, 101 + .ignore_nice = 0, 102 + .freq_step = 5, 103 103 }; 104 104 105 105 static inline unsigned int get_cpu_idle_time(unsigned int cpu) ··· 109 109 if (dbs_tuners_ins.ignore_nice) 110 110 add_nice = kstat_cpu(cpu).cpustat.nice; 111 111 112 - ret = kstat_cpu(cpu).cpustat.idle + 112 + ret = kstat_cpu(cpu).cpustat.idle + 113 113 kstat_cpu(cpu).cpustat.iowait + 114 114 add_nice; 115 115 116 116 return ret; 117 117 } 118 + 119 + /* keep track of frequency transitions */ 120 + static int 121 + dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val, 122 + void *data) 123 + { 124 + struct cpufreq_freqs *freq = data; 125 + struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, 126 + freq->cpu); 127 + 128 + if (!this_dbs_info->enable) 129 + return 0; 130 + 131 + this_dbs_info->requested_freq = freq->new; 132 + 133 + return 0; 134 + } 135 + 136 + static struct notifier_block dbs_cpufreq_notifier_block = { 137 + .notifier_call = dbs_cpufreq_notifier 138 + }; 118 139 119 140 /************************** sysfs interface ************************/ 120 141 static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) ··· 148 127 return sprintf (buf, "%u\n", MIN_SAMPLING_RATE); 149 128 } 150 129 151 - #define define_one_ro(_name) \ 152 - static struct freq_attr _name = \ 130 + #define define_one_ro(_name) \ 131 + static struct freq_attr _name = \ 153 132 __ATTR(_name, 0444, show_##_name, NULL) 154 133 155 134 define_one_ro(sampling_rate_max); ··· 169 148 show_one(ignore_nice_load, ignore_nice); 170 149 show_one(freq_step, freq_step); 171 150 172 - static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, 151 + static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, 173 152 const char *buf, size_t count) 174 153 { 175 154 unsigned int input; ··· 185 164 return count; 186 165 } 187 166 188 - static ssize_t store_sampling_rate(struct cpufreq_policy *unused, 167 + static ssize_t store_sampling_rate(struct cpufreq_policy *unused, 189 168 const char *buf, size_t count) 190 169 { 191 170 unsigned int input; ··· 204 183 return count; 205 184 } 206 185 207 - static ssize_t store_up_threshold(struct cpufreq_policy *unused, 186 + static ssize_t store_up_threshold(struct cpufreq_policy *unused, 208 187 const char *buf, size_t count) 209 188 { 210 189 unsigned int input; ··· 223 202 return count; 224 203 } 225 204 226 - static ssize_t store_down_threshold(struct cpufreq_policy *unused, 205 + static ssize_t store_down_threshold(struct cpufreq_policy *unused, 227 206 const char *buf, size_t count) 228 207 { 229 208 unsigned int input; ··· 249 228 int ret; 250 229 251 230 unsigned int j; 252 - 253 - ret = sscanf (buf, "%u", &input); 254 - if ( ret != 1 ) 231 + 232 + ret = sscanf(buf, "%u", &input); 233 + if (ret != 1) 255 234 return -EINVAL; 256 235 257 - if ( input > 1 ) 236 + if (input > 1) 258 237 input = 1; 259 - 238 + 260 239 mutex_lock(&dbs_mutex); 261 - if ( input == dbs_tuners_ins.ignore_nice ) { /* nothing to do */ 240 + if (input == dbs_tuners_ins.ignore_nice) { /* nothing to do */ 262 241 mutex_unlock(&dbs_mutex); 263 242 return count; 264 243 } ··· 282 261 unsigned int input; 283 262 int ret; 284 263 285 - ret = sscanf (buf, "%u", &input); 264 + ret = sscanf(buf, "%u", &input); 286 265 287 - if ( ret != 1 ) 266 + if (ret != 1) 288 267 return -EINVAL; 289 268 290 - if ( input > 100 ) 269 + if (input > 100) 291 270 input = 100; 292 - 271 + 293 272 /* no need to test here if freq_step is zero as the user might actually 294 273 * want this, they would be crazy though :) */ 295 274 mutex_lock(&dbs_mutex); ··· 343 322 344 323 policy = this_dbs_info->cur_policy; 345 324 346 - /* 347 - * The default safe range is 20% to 80% 325 + /* 326 + * The default safe range is 20% to 80% 348 327 * Every sampling_rate, we check 349 - * - If current idle time is less than 20%, then we try to 350 - * increase frequency 328 + * - If current idle time is less than 20%, then we try to 329 + * increase frequency 351 330 * Every sampling_rate*sampling_down_factor, we check 352 - * - If current idle time is more than 80%, then we try to 353 - * decrease frequency 331 + * - If current idle time is more than 80%, then we try to 332 + * decrease frequency 354 333 * 355 - * Any frequency increase takes it to the maximum frequency. 356 - * Frequency reduction happens at minimum steps of 357 - * 5% (default) of max_frequency 334 + * Any frequency increase takes it to the maximum frequency. 335 + * Frequency reduction happens at minimum steps of 336 + * 5% (default) of max_frequency 358 337 */ 359 338 360 339 /* Check for frequency increase */ ··· 382 361 /* if we are already at full speed then break out early */ 383 362 if (this_dbs_info->requested_freq == policy->max) 384 363 return; 385 - 364 + 386 365 freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100; 387 366 388 367 /* max freq cannot be less than 100. But who knows.... */ 389 368 if (unlikely(freq_step == 0)) 390 369 freq_step = 5; 391 - 370 + 392 371 this_dbs_info->requested_freq += freq_step; 393 372 if (this_dbs_info->requested_freq > policy->max) 394 373 this_dbs_info->requested_freq = policy->max; ··· 448 427 } 449 428 450 429 static void do_dbs_timer(struct work_struct *work) 451 - { 430 + { 452 431 int i; 453 432 mutex_lock(&dbs_mutex); 454 433 for_each_online_cpu(i) 455 434 dbs_check_cpu(i); 456 - schedule_delayed_work(&dbs_work, 435 + schedule_delayed_work(&dbs_work, 457 436 usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); 458 437 mutex_unlock(&dbs_mutex); 459 - } 438 + } 460 439 461 440 static inline void dbs_timer_init(void) 462 441 { ··· 483 462 484 463 switch (event) { 485 464 case CPUFREQ_GOV_START: 486 - if ((!cpu_online(cpu)) || 487 - (!policy->cur)) 465 + if ((!cpu_online(cpu)) || (!policy->cur)) 488 466 return -EINVAL; 489 467 490 468 if (this_dbs_info->enable) /* Already enabled */ 491 469 break; 492 - 470 + 493 471 mutex_lock(&dbs_mutex); 494 472 495 473 rc = sysfs_create_group(&policy->kobj, &dbs_attr_group); ··· 501 481 struct cpu_dbs_info_s *j_dbs_info; 502 482 j_dbs_info = &per_cpu(cpu_dbs_info, j); 503 483 j_dbs_info->cur_policy = policy; 504 - 484 + 505 485 j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(cpu); 506 486 j_dbs_info->prev_cpu_idle_down 507 487 = j_dbs_info->prev_cpu_idle_up; ··· 531 511 dbs_tuners_ins.sampling_rate = def_sampling_rate; 532 512 533 513 dbs_timer_init(); 514 + cpufreq_register_notifier( 515 + &dbs_cpufreq_notifier_block, 516 + CPUFREQ_TRANSITION_NOTIFIER); 534 517 } 535 - 518 + 536 519 mutex_unlock(&dbs_mutex); 537 520 break; 538 521 ··· 548 525 * Stop the timerschedule work, when this governor 549 526 * is used for first time 550 527 */ 551 - if (dbs_enable == 0) 528 + if (dbs_enable == 0) { 552 529 dbs_timer_exit(); 553 - 530 + cpufreq_unregister_notifier( 531 + &dbs_cpufreq_notifier_block, 532 + CPUFREQ_TRANSITION_NOTIFIER); 533 + } 534 + 554 535 mutex_unlock(&dbs_mutex); 555 536 556 537 break; ··· 564 537 if (policy->max < this_dbs_info->cur_policy->cur) 565 538 __cpufreq_driver_target( 566 539 this_dbs_info->cur_policy, 567 - policy->max, CPUFREQ_RELATION_H); 540 + policy->max, CPUFREQ_RELATION_H); 568 541 else if (policy->min > this_dbs_info->cur_policy->cur) 569 542 __cpufreq_driver_target( 570 543 this_dbs_info->cur_policy, 571 - policy->min, CPUFREQ_RELATION_L); 544 + policy->min, CPUFREQ_RELATION_L); 572 545 mutex_unlock(&dbs_mutex); 573 546 break; 574 547 }