Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"These fix two bugs in error code paths in the PM core (system-wide
suspend of devices), a device reference leak in the boot-time suspend
test code and a cpupower utility regression from the 4.7 cycle.

Specifics:

- Prevent the PM core from attempting to suspend parent devices if
any of their children, whose suspend callbacks were invoked
asynchronously, have failed to suspend during the "late" and
"noirq" phases of system-wide suspend of devices (Brian Norris).

- Prevent the boot-time system suspend test code from leaking a
reference to the RTC device used by it (Johan Hovold).

- Fix cpupower to use the return value of one of its library
functions correctly and restore the correct behavior of it when
used for setting cpufreq tunables broken during the 4.7 development
cycle (Laura Abbott)"

* tag 'pm-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails
PM / sleep: fix device reference leak in test_suspend
cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set

+9 -10
+4 -4
drivers/base/power/main.c
··· 1027 1027 TRACE_DEVICE(dev); 1028 1028 TRACE_SUSPEND(0); 1029 1029 1030 + dpm_wait_for_children(dev, async); 1031 + 1030 1032 if (async_error) 1031 1033 goto Complete; 1032 1034 ··· 1039 1037 1040 1038 if (dev->power.syscore || dev->power.direct_complete) 1041 1039 goto Complete; 1042 - 1043 - dpm_wait_for_children(dev, async); 1044 1040 1045 1041 if (dev->pm_domain) { 1046 1042 info = "noirq power domain "; ··· 1174 1174 1175 1175 __pm_runtime_disable(dev, false); 1176 1176 1177 + dpm_wait_for_children(dev, async); 1178 + 1177 1179 if (async_error) 1178 1180 goto Complete; 1179 1181 ··· 1186 1184 1187 1185 if (dev->power.syscore || dev->power.direct_complete) 1188 1186 goto Complete; 1189 - 1190 - dpm_wait_for_children(dev, async); 1191 1187 1192 1188 if (dev->pm_domain) { 1193 1189 info = "late power domain ";
+3 -1
kernel/power/suspend_test.c
··· 203 203 204 204 /* RTCs have initialized by now too ... can we use one? */ 205 205 dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm); 206 - if (dev) 206 + if (dev) { 207 207 rtc = rtc_class_open(dev_name(dev)); 208 + put_device(dev); 209 + } 208 210 if (!rtc) { 209 211 printk(warn_no_rtc); 210 212 return 0;
+2 -5
tools/power/cpupower/utils/cpufreq-set.c
··· 296 296 struct cpufreq_affected_cpus *cpus; 297 297 298 298 if (!bitmask_isbitset(cpus_chosen, cpu) || 299 - cpupower_is_cpu_online(cpu)) 299 + cpupower_is_cpu_online(cpu) != 1) 300 300 continue; 301 301 302 302 cpus = cpufreq_get_related_cpus(cpu); ··· 316 316 cpu <= bitmask_last(cpus_chosen); cpu++) { 317 317 318 318 if (!bitmask_isbitset(cpus_chosen, cpu) || 319 - cpupower_is_cpu_online(cpu)) 320 - continue; 321 - 322 - if (cpupower_is_cpu_online(cpu) != 1) 319 + cpupower_is_cpu_online(cpu) != 1) 323 320 continue; 324 321 325 322 printf(_("Setting cpu: %d\n"), cpu);