Commit 54032b86 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'pm-sleep' and 'pm-cpufreq'

* pm-sleep:
  Documentation: PM: sleep: Document system-wide suspend code flows
  PM: sleep: Add pm_debug_messages kernel command line option
  PM: sleep: core: Drop racy and redundant checks from device_prepare()
  PM: hibernate: Propagate the return value of hibernation_restore()

* pm-cpufreq:
  cpufreq: Select schedutil when using big.LITTLE
  cpufreq: intel_pstate: Select schedutil as the default governor
...@@ -3719,6 +3719,9 @@ ...@@ -3719,6 +3719,9 @@
Override pmtimer IOPort with a hex value. Override pmtimer IOPort with a hex value.
e.g. pmtmr=0x508 e.g. pmtmr=0x508
pm_debug_messages [SUSPEND,KNL]
Enable suspend/resume debug messages during boot up.
pnp.debug=1 [PNP] pnp.debug=1 [PNP]
Enable PNP debug messages (depends on the Enable PNP debug messages (depends on the
CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time
......
This diff is collapsed.
...@@ -8,3 +8,4 @@ System-Wide Power Management ...@@ -8,3 +8,4 @@ System-Wide Power Management
:maxdepth: 2 :maxdepth: 2
sleep-states sleep-states
suspend-flows
...@@ -1922,10 +1922,6 @@ static int device_prepare(struct device *dev, pm_message_t state) ...@@ -1922,10 +1922,6 @@ static int device_prepare(struct device *dev, pm_message_t state)
if (dev->power.syscore) if (dev->power.syscore)
return 0; return 0;
WARN_ON(!pm_runtime_enabled(dev) &&
dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND |
DPM_FLAG_LEAVE_SUSPENDED));
/* /*
* If a device's parent goes into runtime suspend at the wrong time, * If a device's parent goes into runtime suspend at the wrong time,
* it won't be possible to resume the device. To prevent this we * it won't be possible to resume the device. To prevent this we
...@@ -1973,8 +1969,7 @@ static int device_prepare(struct device *dev, pm_message_t state) ...@@ -1973,8 +1969,7 @@ static int device_prepare(struct device *dev, pm_message_t state)
*/ */
spin_lock_irq(&dev->power.lock); spin_lock_irq(&dev->power.lock);
dev->power.direct_complete = state.event == PM_EVENT_SUSPEND && dev->power.direct_complete = state.event == PM_EVENT_SUSPEND &&
((pm_runtime_suspended(dev) && ret > 0) || (ret > 0 || dev->power.no_pm_callbacks) &&
dev->power.no_pm_callbacks) &&
!dev_pm_test_driver_flags(dev, DPM_FLAG_NEVER_SKIP); !dev_pm_test_driver_flags(dev, DPM_FLAG_NEVER_SKIP);
spin_unlock_irq(&dev->power.lock); spin_unlock_irq(&dev->power.lock);
return 0; return 0;
......
...@@ -37,10 +37,12 @@ config CPU_FREQ_STAT ...@@ -37,10 +37,12 @@ config CPU_FREQ_STAT
choice choice
prompt "Default CPUFreq governor" prompt "Default CPUFreq governor"
default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if BIG_LITTLE
default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
default CPU_FREQ_DEFAULT_GOV_PERFORMANCE default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
help help
This option sets which CPUFreq governor shall be loaded at This option sets which CPUFreq governor shall be loaded at
startup. If in doubt, select 'performance'. startup. If in doubt, use the default setting.
config CPU_FREQ_DEFAULT_GOV_PERFORMANCE config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
bool "performance" bool "performance"
......
...@@ -8,6 +8,8 @@ config X86_INTEL_PSTATE ...@@ -8,6 +8,8 @@ config X86_INTEL_PSTATE
depends on X86 depends on X86
select ACPI_PROCESSOR if ACPI select ACPI_PROCESSOR if ACPI
select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO
select CPU_FREQ_GOV_PERFORMANCE
select CPU_FREQ_GOV_SCHEDUTIL if SMP
help help
This driver provides a P state for Intel core processors. This driver provides a P state for Intel core processors.
The driver implements an internal governor and will become The driver implements an internal governor and will become
......
...@@ -678,7 +678,7 @@ static int load_image_and_restore(void) ...@@ -678,7 +678,7 @@ static int load_image_and_restore(void)
error = swsusp_read(&flags); error = swsusp_read(&flags);
swsusp_close(FMODE_READ); swsusp_close(FMODE_READ);
if (!error) if (!error)
hibernation_restore(flags & SF_PLATFORM_MODE); error = hibernation_restore(flags & SF_PLATFORM_MODE);
pr_err("Failed to load image, recovering.\n"); pr_err("Failed to load image, recovering.\n");
swsusp_free(); swsusp_free();
......
...@@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj, ...@@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj,
power_attr(pm_debug_messages); power_attr(pm_debug_messages);
static int __init pm_debug_messages_setup(char *str)
{
pm_debug_messages_on = true;
return 1;
}
__setup("pm_debug_messages", pm_debug_messages_setup);
/** /**
* __pm_pr_dbg - Print a suspend debug message to the kernel log. * __pm_pr_dbg - Print a suspend debug message to the kernel log.
* @defer: Whether or not to use printk_deferred() to print the message. * @defer: Whether or not to use printk_deferred() to print the message.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment