From: Takashi Iwai <tiwai@suse.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
tiwai@suse.com, alsa-devel@alsa-project.org, perex@perex.cz
Subject: Re: [PATCH] ALSA: emu10k1: Stop using iommu_present()
Date: Tue, 05 Apr 2022 14:29:34 +0200 [thread overview]
Message-ID: <s5ha6cz7lxt.wl-tiwai@suse.de> (raw)
In-Reply-To: <5ac9b54285b2189b848da2595408eb3cae8e5e9d.1649160813.git.robin.murphy@arm.com>
On Tue, 05 Apr 2022 14:13:33 +0200,
Robin Murphy wrote:
>
> iommu_get_domain_for_dev() is already perfectly happy to return NULL
> if the given device has no IOMMU. Drop the unnecessary check.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
This will change the code behavior. The current code does nothing if
no IOMMU is found, but after your removal of the check, the code
reaches to emu->iommu_workaround = true incorrectly.
thanks,
Takashi
> ---
> sound/pci/emu10k1/emu10k1_main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
> index 86cc1ca025e4..5ffab343b89c 100644
> --- a/sound/pci/emu10k1/emu10k1_main.c
> +++ b/sound/pci/emu10k1/emu10k1_main.c
> @@ -1751,9 +1751,6 @@ static void snd_emu10k1_detect_iommu(struct snd_emu10k1 *emu)
>
> emu->iommu_workaround = false;
>
> - if (!iommu_present(emu->card->dev->bus))
> - return;
> -
> domain = iommu_get_domain_for_dev(emu->card->dev);
> if (domain && domain->type == IOMMU_DOMAIN_IDENTITY)
> return;
> --
> 2.28.0.dirty
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2022-04-05 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 12:13 [PATCH] ALSA: emu10k1: Stop using iommu_present() Robin Murphy
2022-04-05 12:29 ` Takashi Iwai [this message]
2022-04-05 12:37 ` Robin Murphy
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=s5ha6cz7lxt.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robin.murphy@arm.com \
--cc=tiwai@suse.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