|
49 | 49 | */
|
50 | 50 | #define DEFAULT_DURATION_JIFFIES (6)
|
51 | 51 |
|
52 |
| -static unsigned int target_mwait; |
53 | 52 | static struct dentry *debug_dir;
|
54 | 53 | static bool poll_pkg_cstate_enable;
|
55 | 54 |
|
@@ -312,34 +311,6 @@ MODULE_PARM_DESC(window_size, "sliding window in number of clamping cycles\n"
|
312 | 311 | "\twindow size results in slower response time but more smooth\n"
|
313 | 312 | "\tclamping results. default to 2.");
|
314 | 313 |
|
315 |
| -static void find_target_mwait(void) |
316 |
| -{ |
317 |
| - unsigned int eax, ebx, ecx, edx; |
318 |
| - unsigned int highest_cstate = 0; |
319 |
| - unsigned int highest_subcstate = 0; |
320 |
| - int i; |
321 |
| - |
322 |
| - if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF) |
323 |
| - return; |
324 |
| - |
325 |
| - cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); |
326 |
| - |
327 |
| - if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) || |
328 |
| - !(ecx & CPUID5_ECX_INTERRUPT_BREAK)) |
329 |
| - return; |
330 |
| - |
331 |
| - edx >>= MWAIT_SUBSTATE_SIZE; |
332 |
| - for (i = 0; i < 7 && edx; i++, edx >>= MWAIT_SUBSTATE_SIZE) { |
333 |
| - if (edx & MWAIT_SUBSTATE_MASK) { |
334 |
| - highest_cstate = i; |
335 |
| - highest_subcstate = edx & MWAIT_SUBSTATE_MASK; |
336 |
| - } |
337 |
| - } |
338 |
| - target_mwait = (highest_cstate << MWAIT_SUBSTATE_SIZE) | |
339 |
| - (highest_subcstate - 1); |
340 |
| - |
341 |
| -} |
342 |
| - |
343 | 314 | struct pkg_cstate_info {
|
344 | 315 | bool skip;
|
345 | 316 | int msr_index;
|
@@ -759,9 +730,6 @@ static int __init powerclamp_probe(void)
|
759 | 730 | return -ENODEV;
|
760 | 731 | }
|
761 | 732 |
|
762 |
| - /* find the deepest mwait value */ |
763 |
| - find_target_mwait(); |
764 |
| - |
765 | 733 | return 0;
|
766 | 734 | }
|
767 | 735 |
|
|
0 commit comments