Skip to content

Commit daf6b9b

Browse files
committed
Merge tag 'pm-4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "This includes a PM QoS framework fix from Tejun to prevent interrupts from being enabled unexpectedly during early boot and a cpufreq documentation fix. Specifics: - If the PM QoS framework invokes cancel_delayed_work_sync() during early boot, it will enable interrupts which is not expected at that point, so prevent it from happening (Tejun Heo) - Fix cpufreq statistic documentation to follow a recent change in behavior that forgot to update it as appropriate (Jean Delvare)" * tag 'pm-4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq-stats: Minor documentation fix PM / QoS: avoid calling cancel_delayed_work_sync() during early boot
2 parents c4a6c70 + 8a2a835 commit daf6b9b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Documentation/cpu-freq/cpufreq-stats.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Config Main Menu
103103
Power management options (ACPI, APM) --->
104104
CPU Frequency scaling --->
105105
[*] CPU Frequency scaling
106-
<*> CPU frequency translation statistics
106+
[*] CPU frequency translation statistics
107107
[*] CPU frequency translation statistics details
108108

109109

kernel/power/qos.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,16 @@ void pm_qos_update_request(struct pm_qos_request *req,
482482
return;
483483
}
484484

485-
cancel_delayed_work_sync(&req->work);
485+
/*
486+
* This function may be called very early during boot, for example,
487+
* from of_clk_init(), where irq needs to stay disabled.
488+
* cancel_delayed_work_sync() assumes that irq is enabled on
489+
* invocation and re-enables it on return. Avoid calling it until
490+
* workqueue is initialized.
491+
*/
492+
if (keventd_up())
493+
cancel_delayed_work_sync(&req->work);
494+
486495
__pm_qos_update_request(req, new_value);
487496
}
488497
EXPORT_SYMBOL_GPL(pm_qos_update_request);

0 commit comments

Comments
 (0)