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 Original line 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
			improve throughput, but will also increase the
			amount of memory reserved for use by the client.
			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]
	swapaccount=[0|1]
			[KNL] Enable accounting of swap in memory resource
			[KNL] Enable accounting of swap in memory resource
			controller if no parameter or 1 is given or disable
			controller if no parameter or 1 is given or disable
+6 −4
Original line number Original line Diff line number Diff line
@@ -75,12 +75,14 @@ you should do the following:
# echo platform > /sys/power/disk
# echo platform > /sys/power/disk
# echo disk > /sys/power/state
# echo disk > /sys/power/state


Then, the kernel will try to freeze processes, suspend devices, wait 5 seconds,
Then, the kernel will try to freeze processes, suspend devices, wait a few
resume devices and thaw processes.  If "platform" is written to
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
/sys/power/pm_test , then after suspending devices the kernel will additionally
invoke the global control methods (eg. ACPI global control methods) used to
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
prepare the platform firmware for hibernation.  Next, it will wait a
invoke the platform (eg. ACPI) global methods used to cancel hibernation etc.
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
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
hibernation/suspend operations.  Also, when open for reading, /sys/power/pm_test
+9 −0
Original line number Original line Diff line number Diff line
@@ -4312,6 +4312,15 @@ S: Supported
F:	drivers/phy/
F:	drivers/phy/
F:	include/linux/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
GENERIC UIO DRIVER FOR PCI DEVICES
M:	"Michael S. Tsirkin" <mst@redhat.com>
M:	"Michael S. Tsirkin" <mst@redhat.com>
L:	kvm@vger.kernel.org
L:	kvm@vger.kernel.org
+6 −4
Original line number Original line Diff line number Diff line
#ifndef _ASM_X86_RESUME_TRACE_H
#ifndef _ASM_X86_PM_TRACE_H
#define _ASM_X86_RESUME_TRACE_H
#define _ASM_X86_PM_TRACE_H


#include <asm/asm.h>
#include <asm/asm.h>


@@ -14,8 +14,10 @@ do { \
			     ".previous"			\
			     ".previous"			\
			     :"=r" (tracedata)			\
			     :"=r" (tracedata)			\
			     : "i" (__LINE__), "i" (__FILE__));	\
			     : "i" (__LINE__), "i" (__FILE__));	\
		generate_resume_trace(tracedata, user);		\
		generate_pm_trace(tracedata, user);		\
	}							\
	}							\
} while (0)
} 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 Original line Diff line number Diff line
@@ -298,6 +298,12 @@ static int really_probe(struct device *dev, struct device_driver *drv)
		goto probe_failed;
		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) {
	if (dev->bus->probe) {
		ret = dev->bus->probe(dev);
		ret = dev->bus->probe(dev);
		if (ret)
		if (ret)
@@ -308,6 +314,9 @@ static int really_probe(struct device *dev, struct device_driver *drv)
			goto probe_failed;
			goto probe_failed;
	}
	}


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

	driver_bound(dev);
	driver_bound(dev);
	ret = 1;
	ret = 1;
	pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
	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);
	driver_sysfs_remove(dev);
	dev->driver = NULL;
	dev->driver = NULL;
	dev_set_drvdata(dev, NULL);
	dev_set_drvdata(dev, NULL);
	if (dev->pm_domain && dev->pm_domain->dismiss)
		dev->pm_domain->dismiss(dev);


	if (ret == -EPROBE_DEFER) {
	if (ret == -EPROBE_DEFER) {
		/* Driver requested deferred probing */
		/* Driver requested deferred probing */
@@ -525,6 +536,9 @@ static void __device_release_driver(struct device *dev)
		devres_release_all(dev);
		devres_release_all(dev);
		dev->driver = NULL;
		dev->driver = NULL;
		dev_set_drvdata(dev, 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);
		klist_remove(&dev->p->knode_driver);
		if (dev->bus)
		if (dev->bus)
			blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
			blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
Loading