public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Ricardo Ribalda <ribalda@chromium.org>,
	Chromeos Kdump <chromeos-kdump@google.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Mark Brown <broonie@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, kexec@lists.infradead.org,
	sound-open-firmware@alsa-project.org
Subject: Re: [PATCH v6 2/2] ASoC: SOF: Fix deadlock when shutdown a frozen userspace
Date: Wed, 30 Nov 2022 09:54:11 -0600	[thread overview]
Message-ID: <62a3dbbd-3144-d560-17de-cada6a34502b@linux.intel.com> (raw)
In-Reply-To: <20221127-snd-freeze-v6-2-3e90553f64a5@chromium.org>



On 11/30/22 09:47, Ricardo Ribalda wrote:
> During kexec(), the userspace is frozen. Therefore we cannot wait for it
> to complete.
> 
> Avoid running snd_sof_machine_unregister during shutdown.

That's not what you are doing below - you only unregister clients
conditionally.

I don't know if that's a stale commit message and can't reconcile it
either with the initial discussions in this thread where we were
referring to snd_card_disconnect(), etc?

Confused.

> @@ -484,7 +485,8 @@ int snd_sof_device_shutdown(struct device *dev)
>  	 * 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);
> +	if (!kexec_with_frozen_processes())
> +		sof_unregister_clients(sdev);
>  
>  	snd_sof_machine_unregister(sdev, pdata);
>  
> 

      reply	other threads:[~2022-11-30 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 15:47 [PATCH v6 0/2] ASoC: SOF: Fix deadlock when shutdown a frozen userspace Ricardo Ribalda
2022-11-30 15:47 ` [PATCH v6 1/2] kexec: Introduce kexec_with_frozen_processes Ricardo Ribalda
2022-11-30 15:47 ` [PATCH v6 2/2] ASoC: SOF: Fix deadlock when shutdown a frozen userspace Ricardo Ribalda
2022-11-30 15:54   ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62a3dbbd-3144-d560-17de-cada6a34502b@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chromeos-kdump@google.com \
    --cc=daniel.baluta@nxp.com \
    --cc=ebiederm@xmission.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=ribalda@chromium.org \
    --cc=rostedt@goodmis.org \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox