diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-21 16:57:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-21 16:57:36 -0400 |
| commit | 26c92a38cec99ee7b657901ff64bd01a96a2fb22 (patch) | |
| tree | 8c5c51b76354a81544c9e1f15d29606f859113eb /drivers/base | |
| parent | 1abd8a8f39cd9a2925149000056494523c85643a (diff) | |
| parent | b51e001385f1c861445af3efeab766811ee8db29 (diff) | |
Merge tag 'pm-4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
"These are mostly fixes, including some fixes for changes made during
the recent merge window and some "stable" material, plus some minor
extensions of the turbostat utility.
Specifics:
- Fix the PM core to avoid introducing a runtime PM usage counter
imbalance when adding device links during driver probe (Rafael
Wysocki).
- Fix the operating performance points (OPP) framework to ensure that
the regulator voltage is always updated as appropriate when
updating clock rates (Waldemar Rymarkiewicz).
- Fix the intel_pstate driver to use correct max/min limits for cores
with differing maximum frequences (Srinivas Pandruvada).
- Fix a typo in the intel_pstate driver documentation (Rafael
Wysocki).
- Fix two issues with the recently added Kryo cpufreq driver (Ilia
Lin).
- Fix two recent regressions and some other minor issues in the
turbostat utility and extend it to provide some more diagnostic
information (Len Brown, Nathan Ciobanu)"
* tag 'pm-4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Documentation: intel_pstate: Fix typo
tools/power turbostat: version 18.06.20
tools/power turbostat: add the missing command line switches
tools/power turbostat: add single character tokens to help
tools/power turbostat: alphabetize the help output
tools/power turbostat: fix segfault on 'no node' machines
tools/power turbostat: add optional APIC X2APIC columns
tools/power turbostat: decode cpuid.1.HT
tools/power turbostat: fix show/hide issues resulting from mis-merge
PM / OPP: Update voltage in case freq == old_freq
cpufreq: intel_pstate: Fix scaling max/min limits with Turbo 3.0
cpufreq: kryo: Add module remove and exit
cpufreq: kryo: Fix possible error code dereference
PM / core: Fix supplier device runtime PM usage counter imbalance
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/core.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 36622b52e419..df3e1a44707a 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -236,6 +236,13 @@ struct device_link *device_link_add(struct device *consumer, | |||
| 236 | link->rpm_active = true; | 236 | link->rpm_active = true; |
| 237 | } | 237 | } |
| 238 | pm_runtime_new_link(consumer); | 238 | pm_runtime_new_link(consumer); |
| 239 | /* | ||
| 240 | * If the link is being added by the consumer driver at probe | ||
| 241 | * time, balance the decrementation of the supplier's runtime PM | ||
| 242 | * usage counter after consumer probe in driver_probe_device(). | ||
| 243 | */ | ||
| 244 | if (consumer->links.status == DL_DEV_PROBING) | ||
| 245 | pm_runtime_get_noresume(supplier); | ||
| 239 | } | 246 | } |
| 240 | get_device(supplier); | 247 | get_device(supplier); |
| 241 | link->supplier = supplier; | 248 | link->supplier = supplier; |
| @@ -255,12 +262,12 @@ struct device_link *device_link_add(struct device *consumer, | |||
| 255 | switch (consumer->links.status) { | 262 | switch (consumer->links.status) { |
| 256 | case DL_DEV_PROBING: | 263 | case DL_DEV_PROBING: |
| 257 | /* | 264 | /* |
| 258 | * Balance the decrementation of the supplier's | 265 | * Some callers expect the link creation during |
| 259 | * runtime PM usage counter after consumer probe | 266 | * consumer driver probe to resume the supplier |
| 260 | * in driver_probe_device(). | 267 | * even without DL_FLAG_RPM_ACTIVE. |
| 261 | */ | 268 | */ |
| 262 | if (flags & DL_FLAG_PM_RUNTIME) | 269 | if (flags & DL_FLAG_PM_RUNTIME) |
| 263 | pm_runtime_get_sync(supplier); | 270 | pm_runtime_resume(supplier); |
| 264 | 271 | ||
| 265 | link->status = DL_STATE_CONSUMER_PROBE; | 272 | link->status = DL_STATE_CONSUMER_PROBE; |
| 266 | break; | 273 | break; |
