mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Two power management fixes for v4.15-rc1
This is the change making /proc/cpuinfo on x86 report current CPU frequency in "cpu MHz" again in all cases and an additional one dealing with an overzealous check in one of the helper routines in the runtime PM framework. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJaDvBIAAoJEILEb/54YlRxZ58QAJP6p53XDcml8Risw9CrpnZV 6kBdFTYn6JSJiE4cALTER14ScqHQdTP2M6QJPDDLV5LwiQFa5fJYsSNP7F1Dpg4r 8V3QNZbBjpyc8rSGRUkjY7+WsvUUb2UWzEkLIUjOWIT4mfC969JxV/fBYEL7ZDn9 Wg7q79qI5Tss9PU2GUmaFtdkR0lqUIdNrrWe+qyLl0XHkrmU8DGL4XkPykdkwX0L gn0i/RrK+5DBUVPR1qQTU2CO3751IdIDktpK3RLmWl/yb4TqlM4WKIhIZvvglc2g S+OWGg/E4CNU6/EcGllNCPENAH7v0FNvvLMslPs6ao+wGQBcgO4R5d70dzobph/i P1ns6iJbd+lgRlGSQBReVo/FWcwi4HrINRxAB4W88dBBxchHdt+G3/Juq6GiGEJi mOh3ZHWd0J3mQEIWLKEcm5nHwIeY9yhCFJIpr5azte7JIz1fDuMnnp2gYl1SOVCK CHv0uD8Mw7hQFC0Dzje8T0Hr29MBwpEJiXE4Eh+Fp4zWiI7BYd1TNtp5WPDtchhv weqFqgDArN5gpkrZuSsxxg8eeRRwPeQR/mCyxofmsQ5lplCVJi8Ieqcf/KZrCy/c 1vHGJsn9ec2dNeQKTFFT5luznQSSSXoZCXprumFuTp2804E3Hpkf/UnAldc4EYSn SwzAOO3gNA76eaFikvTK =h6Ux -----END PGP SIGNATURE----- Merge tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull two power management fixes from Rafael Wysocki: "This is the change making /proc/cpuinfo on x86 report current CPU frequency in "cpu MHz" again in all cases and an additional one dealing with an overzealous check in one of the helper routines in the runtime PM framework" * tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / runtime: Drop children check from __pm_runtime_set_status() x86 / CPU: Always show current CPU frequency in /proc/cpuinfo
This commit is contained in:
commit
e75080f185
8 changed files with 80 additions and 46 deletions
|
|
@ -1101,29 +1101,13 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (dev->power.runtime_status == status)
|
||||
if (dev->power.runtime_status == status || !parent)
|
||||
goto out_set;
|
||||
|
||||
if (status == RPM_SUSPENDED) {
|
||||
/*
|
||||
* It is invalid to suspend a device with an active child,
|
||||
* unless it has been set to ignore its children.
|
||||
*/
|
||||
if (!dev->power.ignore_children &&
|
||||
atomic_read(&dev->power.child_count)) {
|
||||
dev_err(dev, "runtime PM trying to suspend device but active child\n");
|
||||
error = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
atomic_add_unless(&parent->power.child_count, -1, 0);
|
||||
notify_parent = !parent->power.ignore_children;
|
||||
}
|
||||
goto out_set;
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
atomic_add_unless(&parent->power.child_count, -1, 0);
|
||||
notify_parent = !parent->power.ignore_children;
|
||||
} else {
|
||||
spin_lock_nested(&parent->power.lock, SINGLE_DEPTH_NESTING);
|
||||
|
||||
/*
|
||||
|
|
@ -1307,6 +1291,13 @@ void pm_runtime_enable(struct device *dev)
|
|||
else
|
||||
dev_warn(dev, "Unbalanced %s!\n", __func__);
|
||||
|
||||
WARN(!dev->power.disable_depth &&
|
||||
dev->power.runtime_status == RPM_SUSPENDED &&
|
||||
!dev->power.ignore_children &&
|
||||
atomic_read(&dev->power.child_count) > 0,
|
||||
"Enabling runtime PM for inactive device (%s) with active children\n",
|
||||
dev_name(dev));
|
||||
|
||||
spin_unlock_irqrestore(&dev->power.lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_runtime_enable);
|
||||
|
|
|
|||
Loading…
Reference in a new issue