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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 C4EBDC43217 for ; Fri, 25 Mar 2022 16:31:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6D00360FFB; Fri, 25 Mar 2022 16:31:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rwd2Ppji2PWR; Fri, 25 Mar 2022 16:31:22 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 4D32E607F0; Fri, 25 Mar 2022 16:31:22 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05CF0C002C; Fri, 25 Mar 2022 16:31:22 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2324AC0012 for ; Fri, 25 Mar 2022 16:31:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0B8CE82656 for ; Fri, 25 Mar 2022 16:31:21 +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 YSEWc97LSbnT for ; Fri, 25 Mar 2022 16:31:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by smtp1.osuosl.org (Postfix) with ESMTPS id 23D3881D16 for ; Fri, 25 Mar 2022 16:31:19 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id E6EC468B05; Fri, 25 Mar 2022 17:31:13 +0100 (CET) Date: Fri, 25 Mar 2022 17:31:13 +0100 From: Christoph Hellwig To: Halil Pasic Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP Message-ID: <20220325163113.GA16426@lst.de> References: <1812355.tdWV9SEqCh@natalenko.name> <20220324055732.GB12078@lst.de> <4386660.LvFx2qVVIh@natalenko.name> <81ffc753-72aa-6327-b87b-3f11915f2549@arm.com> <878rsza0ih.fsf@toke.dk> <4be26f5d8725cdb016c6fdd9d05cfeb69cdd9e09.camel@freebox.fr> <20220324163132.GB26098@lst.de> <20220324193158.5fcae106.pasic@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220324193158.5fcae106.pasic@linux.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Greg Kroah-Hartman , Linus Torvalds , Kalle Valo , linux-wireless , Oleksandr Natalenko , stable , "David S. Miller" , iommu , Olha Cherevyk , Jakub Kicinski , Maxime Bizon , Netdev , Paolo Abeni , Robin Murphy , Christoph Hellwig , Linux Kernel Mailing List 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 Thu, Mar 24, 2022 at 07:31:58PM +0100, Halil Pasic wrote: > I agree with your analysis. Especially with the latter part (were you > state that we don't have a good idiom for that use case). > > I believe, a stronger statement is also true: it is fundamentally > impossible to accommodate use cases where the device and the cpu need > concurrent access to a dma buffer, if the dma buffer isn't in dma > coherent memory. Yes, and that is also clearly stated in the DMA API document. We only have two platforms that do not support DMA coherent memory, one are the oldest PARISC platforms, and the other is coldfire. The first has drivers carefully written to actually support that, the second only has a single driver using DMA that does manual global cache flushes (while pretending it supports coherent memory). > If the dma buffer is in dma coherent memory, and we don't need swiotlb, > then we don't need the dma_sync functionality. Yes. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu