Skip to content

Commit c28d28a

Browse files
committed
Merge tag 'pm-6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These remove an artificial limitation from the intel_idle driver, update the menu cpuidle governor to restore its previous behavior in a corner case and add one more supported platform configuration to the intel_pstate driver: - Allow intel_idle to use _CST information from ACPI tables for idle states enumeration on any family of processors (Len Brown) - Restore corner case behavior of the menu cpuidle governor, related to the handling of systems where idle states selected by the governor are rejected by the cpuidle driver, inadvertently changed during the 6.15 development cycle (Rafael Wysocki) - Add support for Clearwater Forest in the out-of-band (OOB) mode to the intel_pstate driver (Srinivas Pandruvada)" * tag 'pm-6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Support Clearwater Forest OOB mode cpuidle: governors: menu: Avoid using invalid recent intervals data intel_idle: Allow loading ACPI tables for any family
2 parents 6346713 + 5302e2a commit c28d28a

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,6 +2793,7 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
27932793
X86_MATCH(INTEL_GRANITERAPIDS_X, core_funcs),
27942794
X86_MATCH(INTEL_ATOM_CRESTMONT, core_funcs),
27952795
X86_MATCH(INTEL_ATOM_CRESTMONT_X, core_funcs),
2796+
X86_MATCH(INTEL_ATOM_DARKMONT_X, core_funcs),
27962797
{}
27972798
};
27982799
#endif

drivers/cpuidle/governors/menu.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ static inline int which_bucket(u64 duration_ns)
9797

9898
static DEFINE_PER_CPU(struct menu_device, menu_devices);
9999

100+
static void menu_update_intervals(struct menu_device *data, unsigned int interval_us)
101+
{
102+
/* Update the repeating-pattern data. */
103+
data->intervals[data->interval_ptr++] = interval_us;
104+
if (data->interval_ptr >= INTERVALS)
105+
data->interval_ptr = 0;
106+
}
107+
100108
static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev);
101109

102110
/*
@@ -222,6 +230,14 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
222230
if (data->needs_update) {
223231
menu_update(drv, dev);
224232
data->needs_update = 0;
233+
} else if (!dev->last_residency_ns) {
234+
/*
235+
* This happens when the driver rejects the previously selected
236+
* idle state and returns an error, so update the recent
237+
* intervals table to prevent invalid information from being
238+
* used going forward.
239+
*/
240+
menu_update_intervals(data, UINT_MAX);
225241
}
226242

227243
/* Find the shortest expected idle interval. */
@@ -482,10 +498,7 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
482498

483499
data->correction_factor[data->bucket] = new_factor;
484500

485-
/* update the repeating-pattern data */
486-
data->intervals[data->interval_ptr++] = ktime_to_us(measured_ns);
487-
if (data->interval_ptr >= INTERVALS)
488-
data->interval_ptr = 0;
501+
menu_update_intervals(data, ktime_to_us(measured_ns));
489502
}
490503

491504
/**

drivers/idle/intel_idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
16791679
};
16801680

16811681
static const struct x86_cpu_id intel_mwait_ids[] __initconst = {
1682-
X86_MATCH_VENDOR_FAM_FEATURE(INTEL, 6, X86_FEATURE_MWAIT, NULL),
1682+
X86_MATCH_VENDOR_FAM_FEATURE(INTEL, X86_FAMILY_ANY, X86_FEATURE_MWAIT, NULL),
16831683
{}
16841684
};
16851685

0 commit comments

Comments
 (0)