From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Jie Yang <yang.jie@linux.intel.com>,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>
Subject: Re: [alsa-devel] [PATCH v2 09/11] ASoC: Intel: hdac_hdmi: Set ops to NULL on remove
Date: Thu, 20 Jun 2019 08:17:33 +0200 [thread overview]
Message-ID: <26946ff4-1c91-a7e0-4354-132cbd06235a@linux.intel.com> (raw)
In-Reply-To: <0c939329d17c50c353acacf164583ba259a775c0.camel@linux.intel.com>
>>>>> Could you please give a bit more context on what error you see
>>>>> when this happens?
>>>>
>>>> Hi,
>>>>
>>>> I get Oops. This is what happens with all other patches in this
>>>> series and only this one reverted:
>>>>
>>>> root@APL:~# rmmod snd_soc_sst_bxt_rt298
>>>> root@APL:~# rmmod snd_soc_hdac_hdmi
>>>> root@APL:~# rmmod snd_soc_skl
>>>
>>> Thanks, Amadeusz. I think the order in which the drivers are
>>> removed
>>> is what's causing the oops in your case. With SOF, the order we
>>> remove is
>>>
>>> 1. rmmod sof_pci_dev
>>> 2. rmmod snd_soc_sst_bxt_rt298
>>> 3. rmmod snd_soc_hdac_hdmi
>>>
>>
>> Well, there is nothing enforcing the order in which modules can be
>> unloaded (and I see no reason to force it), as you can see from
>> following excerpt, you can either start unloading from
>> snd_soc_sst_bxt_rt298 or snd_soc_skl, and yes if you start from
>> snd_soc_skl, there is no problem.
there is a fundamental dependency that you are ignoring: the module
snd_soc_sst_bxt_rt298 is a machine driver which will be probed when
snd_soc_skl creates a platform_device.
Sure you can remove modules in a different order, but that's a bit of an
artificial/academic exercise isn't it?
>>
> I am good with this patch. I just wanted to understand why we werent
> seeing this error with SOF. Sure, there's nothing enforcing the order
> in which modules are unloaded but there must be a logical order for
> testing purposes.
>
> Pierre, can you please comment on it. I vaguely remember discussing
> this with you last year.
Our tests remove the modules by taking care of dependencies and it's
already unveiled dozens of issues.
We could add a sequence similar to Amadeusz and unbind the modules which
are loaded with the creation of a platform_device (machine driver,
dmic), I am just not sure how of useful this would be.
next prev parent reply other threads:[~2019-06-20 6:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 11:36 [PATCH v2 00/11] Fix driver reload issues Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 01/11] ASoC: Intel: Skylake: Initialize lists before access so they are safe to use Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 02/11] ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded Amadeusz Sławiński
2019-06-17 15:29 ` Takashi Iwai
2019-06-17 11:36 ` [PATCH v2 03/11] ASoC: compress: Fix memory leak from snd_soc_new_compress Amadeusz Sławiński
2019-06-25 12:01 ` Mark Brown
2019-06-17 11:36 ` [PATCH v2 04/11] ASoC: Intel: Skylake: Don't return failure on machine driver reload Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 05/11] ASoC: Intel: Skylake: Remove static table index when parsing topology Amadeusz Sławiński
2019-06-26 12:26 ` Mark Brown
2019-06-17 11:36 ` [PATCH v2 06/11] ASoC: Intel: Skylake: Add function to cleanup debugfs interface Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 07/11] ASoC: Intel: Skylake: Properly cleanup on component removal Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 08/11] ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 09/11] ASoC: Intel: hdac_hdmi: Set ops to NULL on remove Amadeusz Sławiński
2019-06-17 20:51 ` [alsa-devel] " Ranjani Sridharan
2019-06-17 21:36 ` Takashi Iwai
2019-06-18 4:19 ` Ranjani Sridharan
2019-06-18 5:16 ` Takashi Iwai
2019-06-18 11:00 ` Amadeusz Sławiński
2019-06-18 15:58 ` Ranjani Sridharan
2019-06-19 8:38 ` Amadeusz Sławiński
2019-06-19 21:09 ` Ranjani Sridharan
2019-06-20 6:17 ` Pierre-Louis Bossart [this message]
2019-06-24 7:50 ` Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 10/11] ASoC: topology: Consolidate how dtexts and dvalues are freed Amadeusz Sławiński
2019-06-17 11:36 ` [PATCH v2 11/11] ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow Amadeusz Sławiński
2019-06-25 1:17 ` [alsa-devel] " Ranjani Sridharan
2019-06-25 12:04 ` [PATCH v2 00/11] Fix driver reload issues Mark Brown
2019-06-25 13:02 ` [alsa-devel] " Pierre-Louis Bossart
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=26946ff4-1c91-a7e0-4354-132cbd06235a@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yang.jie@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
Powered by JetHome