From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5821FC433F5 for ; Tue, 5 Apr 2022 12:29:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id F2E5640289; Tue, 5 Apr 2022 12:29:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9AHZnIKq-Fml; Tue, 5 Apr 2022 12:29:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9A76940257; Tue, 5 Apr 2022 12:29:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6E285C001D; Tue, 5 Apr 2022 12:29:39 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6F9BFC0012 for ; Tue, 5 Apr 2022 12:29:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5A1054056F for ; Tue, 5 Apr 2022 12:29:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=suse.de header.b="LNyuR9n5"; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=suse.de header.b="oNP8ulzX" Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DcvR4KPLCVEs for ; Tue, 5 Apr 2022 12:29:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1196B4055F for ; Tue, 5 Apr 2022 12:29:36 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 58AE5210EA; Tue, 5 Apr 2022 12:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1649161774; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LX1Y1wytzXUwD49XoymIggwDFSmAem8nS60r7OHveSY=; b=LNyuR9n5V63kXQ4u02QTDo3+rxmPzzHfTsEsTny+dqeOrCbA9qYZvNqxjVSz0Fc7fOwzGb PrZdpcVSlmlw6KmhOiHINFP3p8YyGzsGgVA7pfLe14Ovd23T3n5CsbagnN0TV4b0uAX+vo PbjWnA3Yq4sN+lJpOk8AiXuMRUYtlIQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1649161774; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LX1Y1wytzXUwD49XoymIggwDFSmAem8nS60r7OHveSY=; b=oNP8ulzXNzBvshg0+gstblohTrD+/4vq7Z30nb/vxaTnUA/koNXeLfV7D+mX7UkCZtBFw2 isk2iVy84jtcoPDw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 426B3A3B89; Tue, 5 Apr 2022 12:29:34 +0000 (UTC) Date: Tue, 05 Apr 2022 14:29:34 +0200 Message-ID: From: Takashi Iwai To: Robin Murphy Subject: Re: [PATCH] ALSA: emu10k1: Stop using iommu_present() In-Reply-To: <5ac9b54285b2189b848da2595408eb3cae8e5e9d.1649160813.git.robin.murphy@arm.com> References: <5ac9b54285b2189b848da2595408eb3cae8e5e9d.1649160813.git.robin.murphy@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, tiwai@suse.com, alsa-devel@alsa-project.org, perex@perex.cz X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 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