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

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

+29 -5
+28
drivers/acpi/sleep.c
··· 160 160 return 0; 161 161 } 162 162 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 + 163 171 static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { 164 172 { 165 173 .callback = init_old_suspend_ordering, ··· 351 343 DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), 352 344 }, 353 345 }, 346 + /* 347 + * https://bugzilla.kernel.org/show_bug.cgi?id=196907 348 + * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power 349 + * S0 Idle firmware interface. 350 + */ 351 + { 352 + .callback = init_no_lps0, 353 + .ident = "Dell XPS13 9360", 354 + .matches = { 355 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 356 + DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"), 357 + }, 358 + }, 354 359 {}, 355 360 }; 356 361 ··· 506 485 } 507 486 #else /* !CONFIG_ACPI_SLEEP */ 508 487 #define acpi_target_sleep_state ACPI_STATE_S0 488 + #define acpi_sleep_no_lps0 (false) 509 489 static inline void acpi_sleep_dmi_check(void) {} 510 490 #endif /* CONFIG_ACPI_SLEEP */ 511 491 ··· 884 862 885 863 if (lps0_device_handle) 886 864 return 0; 865 + 866 + if (acpi_sleep_no_lps0) { 867 + acpi_handle_info(adev->handle, 868 + "Low Power S0 Idle interface disabled\n"); 869 + return 0; 870 + } 887 871 888 872 if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) 889 873 return 0;
+1 -5
kernel/sched/cpufreq_schedutil.c
··· 649 649 struct sugov_cpu *sg_cpu = &per_cpu(sugov_cpu, cpu); 650 650 651 651 memset(sg_cpu, 0, sizeof(*sg_cpu)); 652 + sg_cpu->cpu = cpu; 652 653 sg_cpu->sg_policy = sg_policy; 653 654 sg_cpu->flags = SCHED_CPUFREQ_RT; 654 655 sg_cpu->iowait_boost_max = policy->cpuinfo.max_freq; ··· 715 714 716 715 static int __init sugov_register(void) 717 716 { 718 - int cpu; 719 - 720 - for_each_possible_cpu(cpu) 721 - per_cpu(sugov_cpu, cpu).cpu = cpu; 722 - 723 717 return cpufreq_register_governor(&schedutil_gov); 724 718 } 725 719 fs_initcall(sugov_register);