[PATCH v6 0/2] ASoC: SOF: Fix deadlock when shutdown a frozen userspace
Ricardo Ribalda
ribalda at chromium.org
Wed Nov 30 16:47:14 CET 2022
Since: 83bfc7e793b5 ("ASoC: SOF: core: unregister clients and machine drivers in .shutdown")
we wait for all the workloads to be completed during shutdown. This was done to
avoid a stall once the device is started again.
Unfortunately this has the side effect of stalling kexec(), if the userspace
is frozen. Let's handle that case.
To: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
To: Liam Girdwood <lgirdwood at gmail.com>
To: Peter Ujfalusi <peter.ujfalusi at linux.intel.com>
To: Bard Liao <yung-chuan.liao at linux.intel.com>
To: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
To: Kai Vehmanen <kai.vehmanen at linux.intel.com>
To: Daniel Baluta <daniel.baluta at nxp.com>
To: Mark Brown <broonie at kernel.org>
To: Jaroslav Kysela <perex at perex.cz>
To: Takashi Iwai <tiwai at suse.com>
To: Eric Biederman <ebiederm at xmission.com>
To: Chromeos Kdump <chromeos-kdump at google.com>
To: Steven Rostedt <rostedt at goodmis.org>
Cc: stable at vger.kernel.org
Cc: sound-open-firmware at alsa-project.org
Cc: alsa-devel at alsa-project.org
Cc: linux-kernel at vger.kernel.org
Cc: kexec at lists.infradead.org
Signed-off-by: Ricardo Ribalda <ribalda at chromium.org>
---
Changes in v6:
- Check if we are in kexec with the userspace frozen.
- Link to v5: https://lore.kernel.org/r/20221127-snd-freeze-v5-0-4ededeb08ba0@chromium.org
Changes in v5:
- Edit subject prefix.
- Link to v4: https://lore.kernel.org/r/20221127-snd-freeze-v4-0-51ca64b7f2ab@chromium.org
Changes in v4:
- Do not call snd_sof_machine_unregister from shutdown.
- Link to v3: https://lore.kernel.org/r/20221127-snd-freeze-v3-0-a2eda731ca14@chromium.org
Changes in v3:
- Wrap pm_freezing in a function.
- Link to v2: https://lore.kernel.org/r/20221127-snd-freeze-v2-0-d8a425ea9663@chromium.org
Changes in v2:
- Only use pm_freezing if CONFIG_FREEZER .
- Link to v1: https://lore.kernel.org/r/20221127-snd-freeze-v1-0-57461a366ec2@chromium.org
---
Ricardo Ribalda (2):
kexec: Introduce kexec_with_frozen_processes
ASoC: SOF: Fix deadlock when shutdown a frozen userspace
include/linux/kexec.h | 3 +++
kernel/kexec_core.c | 5 +++++
sound/soc/sof/core.c | 4 +++-
3 files changed, 11 insertions(+), 1 deletion(-)
---
base-commit: 4312098baf37ee17a8350725e6e0d0e8590252d4
change-id: 20221127-snd-freeze-1ee143228326
Best regards,
--
Ricardo Ribalda <ribalda at chromium.org>
More information about the Alsa-devel
mailing list