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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 A9FBAC433F5 for ; Mon, 14 Mar 2022 07:31:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 60A9B82A6C; Mon, 14 Mar 2022 07:31:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c6K89IsAR2U8; Mon, 14 Mar 2022 07:31:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1CD50827F0; Mon, 14 Mar 2022 07:31:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E78D6C001D; Mon, 14 Mar 2022 07:31:39 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 71459C000B for ; Mon, 14 Mar 2022 07:31:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6007882813 for ; Mon, 14 Mar 2022 07:31:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TQXAnMa2E8Wh for ; Mon, 14 Mar 2022 07:31:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2CBC08275C for ; Mon, 14 Mar 2022 07:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=fpYq2gch6ejmPkcFKPjSyDr7OAs4OQSLe0uyAoUEPa0=; b=1SiDt8zubg5I0ueT636uOGUNeo nzdNRiaQCUVWgjMPxZ1+oQTQbyiLg/w4TFouHm2BYLknLSuxCv/ojkO1Z5PpI5wlZ3h0uqPrutEh8 OuZPV6b5cmTW9qNKKLWRTUH4LF4VetuO/2a0xOe6Q/Fz+TG4amB4EVcoitlw06DP9dGsILqimGObs ExsRJz/Gu+rY3tdP9ldFzM98I4FPsnUIBEiN1tfsgCwAluNTubp3//rXJ6sYUpzqebfF0FJRHE1lC bxauBfwlUuLRbxzO+E/W4SduALdUw9Kb+9eT67a6+f/Dsi9acNlJyA8zzX7BXeY9ZUCUeg4ftUTle 5C25WlEg==; Received: from [46.140.54.162] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfB1-0044SD-2u; Mon, 14 Mar 2022 07:31:35 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Date: Mon, 14 Mar 2022 08:31:15 +0100 Message-Id: <20220314073129.1862284-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220314073129.1862284-1-hch@lst.de> References: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Cc: Juergen Gross , Tom Lendacky , linux-s390@vger.kernel.org, Stefano Stabellini , linux-ia64@vger.kernel.org, Anshuman Khandual , Konrad Rzeszutek Wilk , Robin Murphy , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, tboot-devel@lists.sourceforge.net, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , David Woodhouse , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org 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" Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0745C433EF for ; Mon, 14 Mar 2022 07:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236669AbiCNHdL (ORCPT ); Mon, 14 Mar 2022 03:33:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236674AbiCNHc7 (ORCPT ); Mon, 14 Mar 2022 03:32:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D40C40A32; Mon, 14 Mar 2022 00:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=fpYq2gch6ejmPkcFKPjSyDr7OAs4OQSLe0uyAoUEPa0=; b=1SiDt8zubg5I0ueT636uOGUNeo nzdNRiaQCUVWgjMPxZ1+oQTQbyiLg/w4TFouHm2BYLknLSuxCv/ojkO1Z5PpI5wlZ3h0uqPrutEh8 OuZPV6b5cmTW9qNKKLWRTUH4LF4VetuO/2a0xOe6Q/Fz+TG4amB4EVcoitlw06DP9dGsILqimGObs ExsRJz/Gu+rY3tdP9ldFzM98I4FPsnUIBEiN1tfsgCwAluNTubp3//rXJ6sYUpzqebfF0FJRHE1lC bxauBfwlUuLRbxzO+E/W4SduALdUw9Kb+9eT67a6+f/Dsi9acNlJyA8zzX7BXeY9ZUCUeg4ftUTle 5C25WlEg==; Received: from [46.140.54.162] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfB1-0044SD-2u; Mon, 14 Mar 2022 07:31:35 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: x86@kernel.org, Anshuman Khandual , Tom Lendacky , Konrad Rzeszutek Wilk , Stefano Stabellini , Boris Ostrovsky , Juergen Gross , Joerg Roedel , David Woodhouse , Lu Baolu , Robin Murphy , linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hyperv@vger.kernel.org, tboot-devel@lists.sourceforge.net, linux-pci@vger.kernel.org Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Date: Mon, 14 Mar 2022 08:31:15 +0100 Message-Id: <20220314073129.1862284-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220314073129.1862284-1-hch@lst.de> References: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 42AFFC433FE for ; Mon, 14 Mar 2022 07:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Od+dSRnWlhcZ6hwCyD8yQOce9UkWGfOhBfkg+sJCGKI=; b=w6DUHFP1PEAFuR PJwluQaFv1kApdWB0vP2JV06z+6LfrTv2ht1H0IIFgXkCocWHh8NJ3VsAJCCW/1x2y5w/ps1aDtCT 3XLv+BLVU7ptYgqKV2Cn5auYDnOELrFAmQ+Wj/Q9t0+shyMk55YIR6M19DkZuBv5GQJxarZQFV6xF UCOEnXenID3geu/bdKFl++0pL1YRoEaCthr4KJuX4yW3oNoegHGI4K/Q0RdHL2SIXzE5sMD8373Ky J5rfIMuyZ+iXHAwCpzi6y2x20U5Wov1ewsT+yLkRwYr9gCaec1wfcVkHCr6HOgwfLX4RTlBsnUCtT F1/5aki9j9LgCJkR+KHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfBj-0044yH-7R; Mon, 14 Mar 2022 07:32:19 +0000 Received: from [46.140.54.162] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfB1-0044SD-2u; Mon, 14 Mar 2022 07:31:35 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: x86@kernel.org, Anshuman Khandual , Tom Lendacky , Konrad Rzeszutek Wilk , Stefano Stabellini , Boris Ostrovsky , Juergen Gross , Joerg Roedel , David Woodhouse , Lu Baolu , Robin Murphy , linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hyperv@vger.kernel.org, tboot-devel@lists.sourceforge.net, linux-pci@vger.kernel.org Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Date: Mon, 14 Mar 2022 08:31:15 +0100 Message-Id: <20220314073129.1862284-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220314073129.1862284-1-hch@lst.de> References: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 D083AC433F5 for ; Mon, 14 Mar 2022 07:33:08 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KH7Yb1trdz3bhx for ; Mon, 14 Mar 2022 18:33:07 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=1SiDt8zu; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=bombadil.srs.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=batv+605a0c0c3369109790a8+6777+infradead.org+hch@bombadil.srs.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KH7XD5hZgz2xMQ for ; Mon, 14 Mar 2022 18:31:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=fpYq2gch6ejmPkcFKPjSyDr7OAs4OQSLe0uyAoUEPa0=; b=1SiDt8zubg5I0ueT636uOGUNeo nzdNRiaQCUVWgjMPxZ1+oQTQbyiLg/w4TFouHm2BYLknLSuxCv/ojkO1Z5PpI5wlZ3h0uqPrutEh8 OuZPV6b5cmTW9qNKKLWRTUH4LF4VetuO/2a0xOe6Q/Fz+TG4amB4EVcoitlw06DP9dGsILqimGObs ExsRJz/Gu+rY3tdP9ldFzM98I4FPsnUIBEiN1tfsgCwAluNTubp3//rXJ6sYUpzqebfF0FJRHE1lC bxauBfwlUuLRbxzO+E/W4SduALdUw9Kb+9eT67a6+f/Dsi9acNlJyA8zzX7BXeY9ZUCUeg4ftUTle 5C25WlEg==; Received: from [46.140.54.162] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfB1-0044SD-2u; Mon, 14 Mar 2022 07:31:35 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Date: Mon, 14 Mar 2022 08:31:15 +0100 Message-Id: <20220314073129.1862284-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220314073129.1862284-1-hch@lst.de> References: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Tom Lendacky , linux-s390@vger.kernel.org, Stefano Stabellini , linux-ia64@vger.kernel.org, Anshuman Khandual , Konrad Rzeszutek Wilk , Robin Murphy , Joerg Roedel , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, tboot-devel@lists.sourceforge.net, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , David Woodhouse , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Lu Baolu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1BA5AC433F5 for ; Mon, 14 Mar 2022 07:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6xPDjFKSzaigbUCLl+ksm3nMZoDhX3IzmRJn9Q4DMog=; b=H1rhfaXh+4/hQm lyvkqv/ev42pMVTr+QsjpMKW+TkcFi9u7sLek5VDh+jgInwykrFfRlbJSFuZbT2mvmAe7rlrTCUnh b+xl4hILZrFN3zd4+OCWqCnLTN1dGb+AOQ9Ki8qD3UCmH4HjHG9SR+jvA7AGhB7nGJZzOzBxzqBv3 wDZ9z3mGnvy21u5eUYLpsOgn16yhUk69Wc6EG+KPguuDNoi87Nmmry3b350dIP+bv53kdx6ckzkNN bEhukgNmqiOifOlaSS4NOu7Q5OJRCILK+M6mJUsp/L2LXX+ixDlARKBGJryAIIA0qkyYXrzt0vMm7 gq2F3UH0BU4t8OEj1ghg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfBG-0044Zu-8b; Mon, 14 Mar 2022 07:31:50 +0000 Received: from [46.140.54.162] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTfB1-0044SD-2u; Mon, 14 Mar 2022 07:31:35 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: x86@kernel.org, Anshuman Khandual , Tom Lendacky , Konrad Rzeszutek Wilk , Stefano Stabellini , Boris Ostrovsky , Juergen Gross , Joerg Roedel , David Woodhouse , Lu Baolu , Robin Murphy , linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hyperv@vger.kernel.org, tboot-devel@lists.sourceforge.net, linux-pci@vger.kernel.org Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Date: Mon, 14 Mar 2022 08:31:15 +0100 Message-Id: <20220314073129.1862284-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220314073129.1862284-1-hch@lst.de> References: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 14 Mar 2022 07:31:15 +0000 Subject: [PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page Message-Id: <20220314073129.1862284-2-hch@lst.de> List-Id: References: <20220314073129.1862284-1-hch@lst.de> In-Reply-To: <20220314073129.1862284-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: iommu@lists.linux-foundation.org Cc: Juergen Gross , Tom Lendacky , linux-s390@vger.kernel.org, Stefano Stabellini , linux-ia64@vger.kernel.org, Anshuman Khandual , Konrad Rzeszutek Wilk , Robin Murphy , x86@kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, tboot-devel@lists.sourceforge.net, linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , David Woodhouse , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e08c7e1a 100644 --- a/kernel/dma/direct.h +++ b/kernel/dma/direct.h @@ -91,7 +91,7 @@ static inline dma_addr_t dma_direct_map_page(struct device *dev, return swiotlb_map(dev, phys, size, dir, attrs); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { - if (swiotlb_force != SWIOTLB_NO_FORCE) + if (is_swiotlb_active(dev)) return swiotlb_map(dev, phys, size, dir, attrs); dev_WARN_ONCE(dev, 1, -- 2.30.2