Skip to content

Commit bce6618

Browse files
sdutta6804gregkh
authored andcommitted
firmware: use power efficient workqueue for unloading and aborting fw load
Allow the scheduler to select the most appropriate CPU for running the firmware load timeout routine and delayed routine for firmware unload. This extends idle residency times and conserves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: Ming Lei <ming.lei@canonical.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shaibal Dutta <shaibal.dutta@broadcom.com> [zoran.markovic@linaro.org: Rebased to latest kernel, added commit message. Fixed code alignment.] Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2b1278c commit bce6618

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎drivers/base/firmware_class.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
902902
dev_set_uevent_suppress(f_dev, false);
903903
dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id);
904904
if (timeout != MAX_SCHEDULE_TIMEOUT)
905-
schedule_delayed_work(&fw_priv->timeout_work, timeout);
905+
queue_delayed_work(system_power_efficient_wq,
906+
&fw_priv->timeout_work, timeout);
906907

907908
kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
908909
}
@@ -1574,8 +1575,8 @@ static void device_uncache_fw_images_work(struct work_struct *work)
15741575
*/
15751576
static void device_uncache_fw_images_delay(unsigned long delay)
15761577
{
1577-
schedule_delayed_work(&fw_cache.work,
1578-
msecs_to_jiffies(delay));
1578+
queue_delayed_work(system_power_efficient_wq, &fw_cache.work,
1579+
msecs_to_jiffies(delay));
15791580
}
15801581

15811582
static int fw_pm_notify(struct notifier_block *notify_block,

0 commit comments

Comments
 (0)