diff options
| author | 2016-09-09 14:47:41 -0700 | |
|---|---|---|
| committer | 2016-09-09 14:47:41 -0700 | |
| commit | daf6b9b68fca57effe3fcf74a8528f17516c420f (patch) | |
| tree | bd9d1c30fc943bfdc712d89de3081384b22115f4 /kernel/power/qos.c | |
| parent | Merge tag 'gpio-v4.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio (diff) | |
| parent | Merge branches 'pm-core-fixes' and 'pm-cpufreq-fixes' (diff) | |
| download | linux-dev-daf6b9b68fca57effe3fcf74a8528f17516c420f.tar.xz linux-dev-daf6b9b68fca57effe3fcf74a8528f17516c420f.zip  | |
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
Diffstat (limited to 'kernel/power/qos.c')
| -rw-r--r-- | kernel/power/qos.c | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 97b0df71303e..168ff442ebde 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -482,7 +482,16 @@ void pm_qos_update_request(struct pm_qos_request *req,  		return;  	} -	cancel_delayed_work_sync(&req->work); +	/* +	 * This function may be called very early during boot, for example, +	 * from of_clk_init(), where irq needs to stay disabled. +	 * cancel_delayed_work_sync() assumes that irq is enabled on +	 * invocation and re-enables it on return.  Avoid calling it until +	 * workqueue is initialized. +	 */ +	if (keventd_up()) +		cancel_delayed_work_sync(&req->work); +  	__pm_qos_update_request(req, new_value);  }  EXPORT_SYMBOL_GPL(pm_qos_update_request);  | 
