public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.0 1/7] ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown"
@ 2022-12-31 20:04 Sasha Levin
  2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 2/7] 9p/client: fix data race on req->status Sasha Levin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sasha Levin @ 2022-12-31 20:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Kai Vehmanen, Ricardo Ribalda, Pierre-Louis Bossart,
	Péter Ujfalusi, Ranjani Sridharan, Mark Brown, Sasha Levin,
	lgirdwood, yung-chuan.liao, daniel.baluta, perex, tiwai,
	sound-open-firmware, alsa-devel

From: Kai Vehmanen <kai.vehmanen@linux.intel.com>

[ Upstream commit 44fda61d2bcfb74a942df93959e083a4e8eff75f ]

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 83bfc7e793b555291785136c3ae86abcdc046887.

Reported-by: Ricardo Ribalda <ribalda@chromium.org>
Cc: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20221209114529.3909192-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/sof/core.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index c99b5e6c026c..694a2d94a222 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -472,19 +472,10 @@ EXPORT_SYMBOL(snd_sof_device_remove);
 int snd_sof_device_shutdown(struct device *dev)
 {
 	struct snd_sof_dev *sdev = dev_get_drvdata(dev);
-	struct snd_sof_pdata *pdata = sdev->pdata;
 
 	if (IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE))
 		cancel_work_sync(&sdev->probe_work);
 
-	/*
-	 * make sure clients and machine driver(s) are unregistered to force
-	 * all userspace devices to be closed prior to the DSP shutdown sequence
-	 */
-	sof_unregister_clients(sdev);
-
-	snd_sof_machine_unregister(sdev, pdata);
-
 	if (sdev->fw_state == SOF_FW_BOOT_COMPLETE)
 		return snd_sof_shutdown(sdev);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-31 20:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-31 20:04 [PATCH AUTOSEL 6.0 1/7] ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown" Sasha Levin
2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 2/7] 9p/client: fix data race on req->status Sasha Levin
2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 3/7] ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet Sasha Levin
2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 4/7] ASoC: SOF: mediatek: initialize panic_info to zero Sasha Levin
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 5/7] drm/amdgpu: Fix size validation for non-exclusive domains (v4) Sasha Levin
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 6/7] drm/amdkfd: Fix kfd_process_device_init_vm error handling Sasha Levin
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 7/7] drm/amdkfd: Fix double release compute pasid Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox