Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fe0952b authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-sleep' and 'pm-domains'

* pm-sleep:
  PM / watchdog: iTCO: stop watchdog during system suspend
  PM / sleep: add pm-trace support for suspending phase
  PM / sleep: add configurable delay for pm_test

* pm-domains:
  PM / domains: avoid potential oops in pm_genpd_remove_device()
  PM / domains: factor out code to get the generic PM domain from a struct device
  PM / domains: quieten down generic pm domains
  PM / Domains: Sync runtime PM status with genpd after probe
  driver core / PM: Add PM domain callbacks for device setup/cleanup
  MAINTAINERS: add entry for Generic PM domains (genpd)
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3462,6 +3462,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			improve throughput, but will also increase the
			amount of memory reserved for use by the client.

	suspend.pm_test_delay=
			[SUSPEND]
			Sets the number of seconds to remain in a suspend test
			mode before resuming the system (see
			/sys/power/pm_test). Only available when CONFIG_PM_DEBUG
			is set. Default value is 5.

	swapaccount=[0|1]
			[KNL] Enable accounting of swap in memory resource
			controller if no parameter or 1 is given or disable
+6 −4
Original line number Diff line number Diff line
@@ -75,12 +75,14 @@ you should do the following:
# echo platform > /sys/power/disk
# echo disk > /sys/power/state

Then, the kernel will try to freeze processes, suspend devices, wait 5 seconds,
resume devices and thaw processes.  If "platform" is written to
Then, the kernel will try to freeze processes, suspend devices, wait a few
seconds (5 by default, but configurable by the suspend.pm_test_delay module
parameter), resume devices and thaw processes.  If "platform" is written to
/sys/power/pm_test , then after suspending devices the kernel will additionally
invoke the global control methods (eg. ACPI global control methods) used to
prepare the platform firmware for hibernation.  Next, it will wait 5 seconds and
invoke the platform (eg. ACPI) global methods used to cancel hibernation etc.
prepare the platform firmware for hibernation.  Next, it will wait a
configurable number of seconds and invoke the platform (eg. ACPI) global
methods used to cancel hibernation etc.

Writing "none" to /sys/power/pm_test causes the kernel to switch to the normal
hibernation/suspend operations.  Also, when open for reading, /sys/power/pm_test
+9 −0
Original line number Diff line number Diff line
@@ -4312,6 +4312,15 @@ S: Supported
F:	drivers/phy/
F:	include/linux/phy/

GENERIC PM DOMAINS
M:	"Rafael J. Wysocki" <rjw@rjwysocki.net>
M:	Kevin Hilman <khilman@kernel.org>
M:	Ulf Hansson <ulf.hansson@linaro.org>
L:	linux-pm@vger.kernel.org
S:	Supported
F:	drivers/base/power/domain*.c
F:	include/linux/pm_domain.h

GENERIC UIO DRIVER FOR PCI DEVICES
M:	"Michael S. Tsirkin" <mst@redhat.com>
L:	kvm@vger.kernel.org
+6 −4
Original line number Diff line number Diff line
#ifndef _ASM_X86_RESUME_TRACE_H
#define _ASM_X86_RESUME_TRACE_H
#ifndef _ASM_X86_PM_TRACE_H
#define _ASM_X86_PM_TRACE_H

#include <asm/asm.h>

@@ -14,8 +14,10 @@ do { \
			     ".previous"			\
			     :"=r" (tracedata)			\
			     : "i" (__LINE__), "i" (__FILE__));	\
		generate_resume_trace(tracedata, user);		\
		generate_pm_trace(tracedata, user);		\
	}							\
} while (0)

#endif /* _ASM_X86_RESUME_TRACE_H */
#define TRACE_SUSPEND(user)	TRACE_RESUME(user)

#endif /* _ASM_X86_PM_TRACE_H */
+14 −0
Original line number Diff line number Diff line
@@ -298,6 +298,12 @@ static int really_probe(struct device *dev, struct device_driver *drv)
		goto probe_failed;
	}

	if (dev->pm_domain && dev->pm_domain->activate) {
		ret = dev->pm_domain->activate(dev);
		if (ret)
			goto probe_failed;
	}

	if (dev->bus->probe) {
		ret = dev->bus->probe(dev);
		if (ret)
@@ -308,6 +314,9 @@ static int really_probe(struct device *dev, struct device_driver *drv)
			goto probe_failed;
	}

	if (dev->pm_domain && dev->pm_domain->sync)
		dev->pm_domain->sync(dev);

	driver_bound(dev);
	ret = 1;
	pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
@@ -319,6 +328,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
	driver_sysfs_remove(dev);
	dev->driver = NULL;
	dev_set_drvdata(dev, NULL);
	if (dev->pm_domain && dev->pm_domain->dismiss)
		dev->pm_domain->dismiss(dev);

	if (ret == -EPROBE_DEFER) {
		/* Driver requested deferred probing */
@@ -525,6 +536,9 @@ static void __device_release_driver(struct device *dev)
		devres_release_all(dev);
		dev->driver = NULL;
		dev_set_drvdata(dev, NULL);
		if (dev->pm_domain && dev->pm_domain->dismiss)
			dev->pm_domain->dismiss(dev);

		klist_remove(&dev->p->knode_driver);
		if (dev->bus)
			blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
Loading