Skip to content

Commit 3fefc31

Browse files
committed
Merge tag 'pm-final-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull final power management fixes from Rafael Wysocki: "These fix a regression in the schedutil cpufreq governor introduced by a recent change and blacklist Dell XPS13 9360 from using the Low Power S0 Idle _DSM interface which triggers serious problems on one of these machines. Specifics: - Prevent the schedutil cpufreq governor from using the utilization of a wrong CPU in some cases which started to happen after one of the recent changes in it (Chris Redpath). - Blacklist Dell XPS13 9360 from using the Low Power S0 Idle _DSM interface as that causes serious issue (related to NVMe) to appear on one of these machines, even though the other Dells XPS13 9360 in somewhat different HW configurations behave correctly (Rafael Wysocki)" * tag 'pm-final-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360 cpufreq: schedutil: Examine the correct CPU when we update util
2 parents d93d4ce + e029b9b commit 3fefc31

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

drivers/acpi/sleep.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
160160
return 0;
161161
}
162162

163+
static bool acpi_sleep_no_lps0;
164+
165+
static int __init init_no_lps0(const struct dmi_system_id *d)
166+
{
167+
acpi_sleep_no_lps0 = true;
168+
return 0;
169+
}
170+
163171
static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
164172
{
165173
.callback = init_old_suspend_ordering,
@@ -343,6 +351,19 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
343351
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
344352
},
345353
},
354+
/*
355+
* https://bugzilla.kernel.org/show_bug.cgi?id=196907
356+
* Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
357+
* S0 Idle firmware interface.
358+
*/
359+
{
360+
.callback = init_no_lps0,
361+
.ident = "Dell XPS13 9360",
362+
.matches = {
363+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
364+
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
365+
},
366+
},
346367
{},
347368
};
348369

@@ -485,6 +506,7 @@ static void acpi_pm_end(void)
485506
}
486507
#else /* !CONFIG_ACPI_SLEEP */
487508
#define acpi_target_sleep_state ACPI_STATE_S0
509+
#define acpi_sleep_no_lps0 (false)
488510
static inline void acpi_sleep_dmi_check(void) {}
489511
#endif /* CONFIG_ACPI_SLEEP */
490512

@@ -863,6 +885,12 @@ static int lps0_device_attach(struct acpi_device *adev,
863885
if (lps0_device_handle)
864886
return 0;
865887

888+
if (acpi_sleep_no_lps0) {
889+
acpi_handle_info(adev->handle,
890+
"Low Power S0 Idle interface disabled\n");
891+
return 0;
892+
}
893+
866894
if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
867895
return 0;
868896

kernel/sched/cpufreq_schedutil.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ static int sugov_start(struct cpufreq_policy *policy)
649649
struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu);
650650

651651
memset(sg_cpu, 0, sizeof(*sg_cpu));
652+
sg_cpu->cpu = cpu;
652653
sg_cpu->sg_policy = sg_policy;
653654
sg_cpu->flags = SCHED_CPUFREQ_RT;
654655
sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq;
@@ -714,11 +715,6 @@ struct cpufreq_governor *cpufreq_default_governor(void)
714715

715716
static int __init sugov_register(void)
716717
{
717-
int cpu;
718-
719-
for_each_possible_cpu(cpu)
720-
per_cpu(sugov_cpu, cpu).cpu = cpu;
721-
722718
return cpufreq_register_governor(&schedutil_gov);
723719
}
724720
fs_initcall(sugov_register);

0 commit comments

Comments
 (0)