Skip to content

Commit 44fda61

Browse files
kv2019ibroonie
authored andcommitted
ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown"
The unregister machine drivers call is not safe to do when kexec is used. Kexec-lite gets blocked with following backtrace: [ 84.943749] Freezing user space processes ... (elapsed 0.111 seconds) done. [ 246.784446] INFO: task kexec-lite:5123 blocked for more than 122 seconds. [ 246.819035] Call Trace: [ 246.821782] <TASK> [ 246.824186] __schedule+0x5f9/0x1263 [ 246.828231] schedule+0x87/0xc5 [ 246.831779] snd_card_disconnect_sync+0xb5/0x127 ... [ 246.889249] snd_sof_device_shutdown+0xb4/0x150 [ 246.899317] pci_device_shutdown+0x37/0x61 [ 246.903990] device_shutdown+0x14c/0x1d6 [ 246.908391] kernel_kexec+0x45/0xb9 This reverts commit 83bfc7e. Reported-by: Ricardo Ribalda <[email protected]> Cc: Ricardo Ribalda <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2aa2a5e commit 44fda61

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

sound/soc/sof/core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,19 +475,10 @@ EXPORT_SYMBOL(snd_sof_device_remove);
475475
int snd_sof_device_shutdown(struct device *dev)
476476
{
477477
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
478-
struct snd_sof_pdata *pdata = sdev->pdata;
479478

480479
if (IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE))
481480
cancel_work_sync(&sdev->probe_work);
482481

483-
/*
484-
* make sure clients and machine driver(s) are unregistered to force
485-
* all userspace devices to be closed prior to the DSP shutdown sequence
486-
*/
487-
sof_unregister_clients(sdev);
488-
489-
snd_sof_machine_unregister(sdev, pdata);
490-
491482
if (sdev->fw_state == SOF_FW_BOOT_COMPLETE)
492483
return snd_sof_shutdown(sdev);
493484

0 commit comments

Comments
 (0)