Skip to content

Commit 667c889

Browse files
committed
Merge tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control update from Rafael Wysocki: "Remove some dead code from the Intel powerclamp thermal control driver (Srinivas Pandruvada)" * tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: powerclamp: Remove dead code for target mwait value
2 parents 0c879d8 + c6a783b commit 667c889

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

drivers/thermal/intel/intel_powerclamp.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
*/
5050
#define DEFAULT_DURATION_JIFFIES (6)
5151

52-
static unsigned int target_mwait;
5352
static struct dentry *debug_dir;
5453
static bool poll_pkg_cstate_enable;
5554

@@ -312,34 +311,6 @@ MODULE_PARM_DESC(window_size, "sliding window in number of clamping cycles\n"
312311
"\twindow size results in slower response time but more smooth\n"
313312
"\tclamping results. default to 2.");
314313

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-
343314
struct pkg_cstate_info {
344315
bool skip;
345316
int msr_index;
@@ -759,9 +730,6 @@ static int __init powerclamp_probe(void)
759730
return -ENODEV;
760731
}
761732

762-
/* find the deepest mwait value */
763-
find_target_mwait();
764-
765733
return 0;
766734
}
767735

0 commit comments

Comments
 (0)