summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-18 11:34:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-10-18 11:34:04 -0400
commite59b76ff67e527e58914409f13a9cffa1cbf42e7 (patch)
tree80bb7f7c654b7beb46f1f61183e1c5d0f22dc3a7 /drivers/acpi
parentc3419fd6d3a340d23329ce01bb391deb27d8368b (diff)
parentb23eb5c74e6eb6a0b3fb9cf3eb64481a17ce1cd1 (diff)
Merge tag 'pm-5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These include a fix for a recent regression in the ACPI CPU performance scaling code, a PCI device power management fix, a system shutdown fix related to cpufreq, a removal of an ACPI suspend-to-idle blacklist entry and a build warning fix. Specifics: - Fix possible NULL pointer dereference in the ACPI processor scaling initialization code introduced by a recent cpufreq update (Rafael Wysocki). - Fix possible deadlock due to suspending cpufreq too late during system shutdown (Rafael Wysocki). - Make the PCI device system resume code path be more consistent with its PM-runtime counterpart to fix an issue with missing delay on transitions from D3cold to D0 during system resume from suspend-to-idle on some systems (Rafael Wysocki). - Drop Dell XPS13 9360 from the LPS0 Idle _DSM blacklist to make it use suspend-to-idle by default (Mario Limonciello). - Fix build warning in the core system suspend support code (Ben Dooks)" * tag 'pm-5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: processor: Avoid NULL pointer dereferences at init time PCI: PM: Fix pci_power_up() PM: sleep: include <linux/pm_runtime.h> for pm_wq cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown ACPI: PM: Drop Dell XPS13 9360 from LPS0 Idle _DSM blacklist
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_perflib.c10
-rw-r--r--drivers/acpi/processor_thermal.c10
-rw-r--r--drivers/acpi/sleep.c13
3 files changed, 12 insertions, 21 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 2261713d1aec..930a49fa4dfc 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -162,21 +162,23 @@ void acpi_processor_ppc_init(int cpu)
162 struct acpi_processor *pr = per_cpu(processors, cpu); 162 struct acpi_processor *pr = per_cpu(processors, cpu);
163 int ret; 163 int ret;
164 164
165 if (!pr)
166 return;
167
165 ret = dev_pm_qos_add_request(get_cpu_device(cpu), 168 ret = dev_pm_qos_add_request(get_cpu_device(cpu),
166 &pr->perflib_req, DEV_PM_QOS_MAX_FREQUENCY, 169 &pr->perflib_req, DEV_PM_QOS_MAX_FREQUENCY,
167 INT_MAX); 170 INT_MAX);
168 if (ret < 0) { 171 if (ret < 0)
169 pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu, 172 pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
170 ret); 173 ret);
171 return;
172 }
173} 174}
174 175
175void acpi_processor_ppc_exit(int cpu) 176void acpi_processor_ppc_exit(int cpu)
176{ 177{
177 struct acpi_processor *pr = per_cpu(processors, cpu); 178 struct acpi_processor *pr = per_cpu(processors, cpu);
178 179
179 dev_pm_qos_remove_request(&pr->perflib_req); 180 if (pr)
181 dev_pm_qos_remove_request(&pr->perflib_req);
180} 182}
181 183
182static int acpi_processor_get_performance_control(struct acpi_processor *pr) 184static int acpi_processor_get_performance_control(struct acpi_processor *pr)
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index ec2638f1df4f..8227c7dd75b1 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -130,21 +130,23 @@ void acpi_thermal_cpufreq_init(int cpu)
130 struct acpi_processor *pr = per_cpu(processors, cpu); 130 struct acpi_processor *pr = per_cpu(processors, cpu);
131 int ret; 131 int ret;
132 132
133 if (!pr)
134 return;
135
133 ret = dev_pm_qos_add_request(get_cpu_device(cpu), 136 ret = dev_pm_qos_add_request(get_cpu_device(cpu),
134 &pr->thermal_req, DEV_PM_QOS_MAX_FREQUENCY, 137 &pr->thermal_req, DEV_PM_QOS_MAX_FREQUENCY,
135 INT_MAX); 138 INT_MAX);
136 if (ret < 0) { 139 if (ret < 0)
137 pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu, 140 pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
138 ret); 141 ret);
139 return;
140 }
141} 142}
142 143
143void acpi_thermal_cpufreq_exit(int cpu) 144void acpi_thermal_cpufreq_exit(int cpu)
144{ 145{
145 struct acpi_processor *pr = per_cpu(processors, cpu); 146 struct acpi_processor *pr = per_cpu(processors, cpu);
146 147
147 dev_pm_qos_remove_request(&pr->thermal_req); 148 if (pr)
149 dev_pm_qos_remove_request(&pr->thermal_req);
148} 150}
149#else /* ! CONFIG_CPU_FREQ */ 151#else /* ! CONFIG_CPU_FREQ */
150static int cpufreq_get_max_state(unsigned int cpu) 152static int cpufreq_get_max_state(unsigned int cpu)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 9fa77d72ef27..2af937a8b1c5 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -362,19 +362,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
362 }, 362 },
363 }, 363 },
364 /* 364 /*
365 * https://bugzilla.kernel.org/show_bug.cgi?id=196907
366 * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
367 * S0 Idle firmware interface.
368 */
369 {
370 .callback = init_default_s3,
371 .ident = "Dell XPS13 9360",
372 .matches = {
373 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
374 DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
375 },
376 },
377 /*
378 * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using 365 * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
379 * the Low Power S0 Idle firmware interface (see 366 * the Low Power S0 Idle firmware interface (see
380 * https://bugzilla.kernel.org/show_bug.cgi?id=199057). 367 * https://bugzilla.kernel.org/show_bug.cgi?id=199057).