Merge branches 'pm-cpufreq' and 'pm-sleep'
* pm-cpufreq: ACPI: processor: Avoid NULL pointer dereferences at init time cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown * pm-sleep: PM: sleep: include <linux/pm_runtime.h> for pm_wq ACPI: PM: Drop Dell XPS13 9360 from LPS0 Idle _DSM blacklist
This commit is contained in:
commit
b23eb5c74e
|
@ -162,21 +162,23 @@ void acpi_processor_ppc_init(int cpu)
|
|||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||
int ret;
|
||||
|
||||
if (!pr)
|
||||
return;
|
||||
|
||||
ret = dev_pm_qos_add_request(get_cpu_device(cpu),
|
||||
&pr->perflib_req, DEV_PM_QOS_MAX_FREQUENCY,
|
||||
INT_MAX);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
||||
ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void acpi_processor_ppc_exit(int cpu)
|
||||
{
|
||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||
|
||||
dev_pm_qos_remove_request(&pr->perflib_req);
|
||||
if (pr)
|
||||
dev_pm_qos_remove_request(&pr->perflib_req);
|
||||
}
|
||||
|
||||
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
||||
|
|
|
@ -130,21 +130,23 @@ void acpi_thermal_cpufreq_init(int cpu)
|
|||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||
int ret;
|
||||
|
||||
if (!pr)
|
||||
return;
|
||||
|
||||
ret = dev_pm_qos_add_request(get_cpu_device(cpu),
|
||||
&pr->thermal_req, DEV_PM_QOS_MAX_FREQUENCY,
|
||||
INT_MAX);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
||||
ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void acpi_thermal_cpufreq_exit(int cpu)
|
||||
{
|
||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||
|
||||
dev_pm_qos_remove_request(&pr->thermal_req);
|
||||
if (pr)
|
||||
dev_pm_qos_remove_request(&pr->thermal_req);
|
||||
}
|
||||
#else /* ! CONFIG_CPU_FREQ */
|
||||
static int cpufreq_get_max_state(unsigned int cpu)
|
||||
|
|
|
@ -361,19 +361,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=196907
|
||||
* Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
|
||||
* S0 Idle firmware interface.
|
||||
*/
|
||||
{
|
||||
.callback = init_default_s3,
|
||||
.ident = "Dell XPS13 9360",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
|
||||
* the Low Power S0 Idle firmware interface (see
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/fwnode.h>
|
||||
|
@ -3179,6 +3180,8 @@ void device_shutdown(void)
|
|||
wait_for_device_probe();
|
||||
device_block_probing();
|
||||
|
||||
cpufreq_suspend();
|
||||
|
||||
spin_lock(&devices_kset->list_lock);
|
||||
/*
|
||||
* Walk the devices list backward, shutting down each in turn.
|
||||
|
|
|
@ -2737,14 +2737,6 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(cpufreq_unregister_driver);
|
||||
|
||||
/*
|
||||
* Stop cpufreq at shutdown to make sure it isn't holding any locks
|
||||
* or mutexes when secondary CPUs are halted.
|
||||
*/
|
||||
static struct syscore_ops cpufreq_syscore_ops = {
|
||||
.shutdown = cpufreq_suspend,
|
||||
};
|
||||
|
||||
struct kobject *cpufreq_global_kobject;
|
||||
EXPORT_SYMBOL(cpufreq_global_kobject);
|
||||
|
||||
|
@ -2756,8 +2748,6 @@ static int __init cpufreq_core_init(void)
|
|||
cpufreq_global_kobject = kobject_create_and_add("cpufreq", &cpu_subsys.dev_root->kobj);
|
||||
BUG_ON(!cpufreq_global_kobject);
|
||||
|
||||
register_syscore_ops(&cpufreq_syscore_ops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
module_param(off, int, 0444);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/seq_file.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include "power.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue