Currently if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.
This lack of consistentcy cannot be addressed without refactoring the API.
system_wq is a per-CPU worqueue, replaced by system_percpu_wq. Despite that,
system_wq in this change has been replaced by system_dfl_wq, because there
aren't per-cpu variables.
The old wq will be kept for a few release cylces.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20250929155053.400342-2-marco.crivellari@suse.com
Signed-off-by: Mark Brown <broonie@kernel.org>
if (sync_start == AW88081_SYNC_START)
aw88081_start_pa(aw88081);
else
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&aw88081->start_work,
AW88081_START_WORK_DELAY_MS);
}
if (sync_start == AW88166_SYNC_START)
aw88166_start_pa(aw88166);
else
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&aw88166->start_work,
AW88166_START_WORK_DELAY_MS);
}
if (sync_start == AW88261_SYNC_START)
aw88261_start_pa(aw88261);
else
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&aw88261->start_work,
AW88261_START_WORK_DELAY_MS);
}
if (sync_start == AW88395_SYNC_START)
aw88395_start_pa(aw88395);
else
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&aw88395->start_work,
AW88395_START_WORK_DELAY_MS);
}
if (sync_start == AW88399_SYNC_START)
aw88399_start_pa(aw88399);
else
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&aw88399->start_work,
AW88399_START_WORK_DELAY_MS);
}
{
struct cs42l43_codec *priv = data;
- queue_delayed_work(system_wq, &priv->bias_sense_timeout,
+ queue_delayed_work(system_dfl_wq, &priv->bias_sense_timeout,
msecs_to_jiffies(1000));
return IRQ_HANDLED;
priv->hp_ilimit_count--;
if (priv->hp_ilimit_count)
- queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work,
+ queue_delayed_work(system_dfl_wq, &priv->hp_ilimit_clear_work,
msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS));
snd_soc_dapm_mutex_unlock(dapm);
if (priv->hp_ilimit_count < CS42L43_HP_ILIMIT_MAX_COUNT) {
if (!priv->hp_ilimit_count)
- queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work,
+ queue_delayed_work(system_dfl_wq, &priv->hp_ilimit_clear_work,
msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS));
priv->hp_ilimit_count++;
press_count = 0;
}
button_to_report = cur_button;
- queue_delayed_work(system_wq, &es8326->button_press_work,
+ queue_delayed_work(system_dfl_wq, &es8326->button_press_work,
msecs_to_jiffies(35));
} else if (prev_button != cur_button) {
/* mismatch, detect again */
prev_button = cur_button;
- queue_delayed_work(system_wq, &es8326->button_press_work,
+ queue_delayed_work(system_dfl_wq, &es8326->button_press_work,
msecs_to_jiffies(35));
} else {
/* released or no pressed */
(ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON));
regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x1f);
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x0d);
- queue_delayed_work(system_wq, &es8326->jack_detect_work,
+ queue_delayed_work(system_dfl_wq, &es8326->jack_detect_work,
msecs_to_jiffies(400));
es8326->hp = 1;
goto exit;
regmap_write(es8326->regmap, ES8326_INT_SOURCE,
(ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON));
es8326_enable_micbias(es8326->component);
- queue_delayed_work(system_wq, &es8326->button_press_work, 10);
+ queue_delayed_work(system_dfl_wq, &es8326->button_press_work, 10);
goto exit;
}
if ((iface & ES8326_HPBUTTON_FLAG) == 0x01) {
goto out;
if (es8326->jack->status & SND_JACK_HEADSET)
- queue_delayed_work(system_wq, &es8326->jack_detect_work,
+ queue_delayed_work(system_dfl_wq, &es8326->jack_detect_work,
msecs_to_jiffies(10));
else
- queue_delayed_work(system_wq, &es8326->jack_detect_work,
+ queue_delayed_work(system_dfl_wq, &es8326->jack_detect_work,
msecs_to_jiffies(300));
out:
dev_dbg(regmap_get_device(rt5663->regmap), "%s IRQ queue work\n",
__func__);
- queue_delayed_work(system_wq, &rt5663->jack_detect_work,
+ queue_delayed_work(system_dfl_wq, &rt5663->jack_detect_work,
msecs_to_jiffies(250));
return IRQ_HANDLED;
cancel_delayed_work_sync(
&rt5663->jd_unplug_work);
} else {
- queue_delayed_work(system_wq,
+ queue_delayed_work(system_dfl_wq,
&rt5663->jd_unplug_work,
msecs_to_jiffies(500));
}
SND_JACK_BTN_0 | SND_JACK_BTN_1 |
SND_JACK_BTN_2 | SND_JACK_BTN_3);
} else {
- queue_delayed_work(system_wq, &rt5663->jd_unplug_work,
+ queue_delayed_work(system_dfl_wq, &rt5663->jd_unplug_work,
msecs_to_jiffies(500));
}
}
priv->speaker_en = !SND_SOC_DAPM_EVENT_ON(event);
- queue_delayed_work(system_wq, &priv->pcm_pop_work, msecs_to_jiffies(70));
+ queue_delayed_work(system_dfl_wq, &priv->pcm_pop_work, msecs_to_jiffies(70));
return 0;
}
* CTX_SAVE IPC, which is sent before the DSP enters D3.
*/
if (hdr->cmd != (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_CTX_SAVE))
- mod_delayed_work(system_wq, &hdev->d0i3_work,
+ mod_delayed_work(system_dfl_wq, &hdev->d0i3_work,
msecs_to_jiffies(SOF_HDA_D0I3_WORK_DELAY_MS));
return 0;
if (hda_dsp_ipc4_pm_msg(msg_data->primary))
return;
- mod_delayed_work(system_wq, &hdev->d0i3_work,
+ mod_delayed_work(system_dfl_wq, &hdev->d0i3_work,
msecs_to_jiffies(SOF_HDA_D0I3_WORK_DELAY_MS));
}
EXPORT_SYMBOL_NS(hda_dsp_ipc4_schedule_d0i3_work, "SND_SOC_SOF_INTEL_HDA_COMMON");