Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2109020pxb; Fri, 25 Mar 2022 11:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3EBAqY0oGeTYoeFsfSOKJAd/3urXqFwk9B/IgNi0l9Ze6IVEUcX62cx2PxO0gzYgW5xYz X-Received: by 2002:a17:90a:c984:b0:1bf:aee2:3503 with SMTP id w4-20020a17090ac98400b001bfaee23503mr14071490pjt.28.1648232067553; Fri, 25 Mar 2022 11:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232067; cv=none; d=google.com; s=arc-20160816; b=jUPTV6N8k9hWVERS2hoqt8guNuzfL+WFX2GuMvi3XEVOgOiSjekGZhqa+oBgiyJOws 0g7ClLpsJWM7SuBLw1YVt2MyuhGFGrCYTu6pbl8M/zz3jbCIFlKCyyviBfVHDpAHyHlO Tko8UmN/rP4JZ31V9YoZXw90I843QVa56mTTysjHtVcV45xKJ8XB+Q7FpKPC3eEQckL0 odq29oBxOF94/MPma1ddzGOfkpTmMj6+8bcGX4WjZm/3ElRmjewfVqK8uX54tif3LrBG Yc/YNsLa7zrZkztL1gFpPEU0lKgpaqCneHrGYaI0D76fH4pUugBI8YvFKvZDShAmfo+T VHxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2ZGDpUdpspzwig/4UQv+C5BwcmEmpPHx1rhNoedpO4w=; b=P9+hmoTkYIqmeDZN1GLbN55w9bUEtd6+3X310sqeNVmEofgzvWECqtl6nAEx3ID/25 hAal5us2WCNbtzm1Vkg7HzvAhDADaFswwLM7T6cNVQiO8EsuCsK+m1hyT4gNMsqHauFD +hq4t+ounr9CGd0FZ5f2lxpv0pqqjNtX3oDU85QqsTdLqtjx4RK+Brx+vmD6WkMK/Dgv VmPHZLpz46xrA47/TuZpKrjxI8upBmwA70FkctEqZu9EX3fwgMdgXRM9CdJRprVBbSsa 0nAOl8R4bxOK9acVaLbZyDWqRpfCYwwrPTraw3cwPWFhb7ZdNlOZUCWH/7mL4GtKYnuc o4HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c17-20020a056a00249100b004fa3a8dff81si3855931pfv.56.2022.03.25.11.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:14:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D814512AC6; Fri, 25 Mar 2022 10:44:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359137AbiCYQcy (ORCPT + 70 others); Fri, 25 Mar 2022 12:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241341AbiCYQcw (ORCPT ); Fri, 25 Mar 2022 12:32:52 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66BCDDB48A; Fri, 25 Mar 2022 09:31:18 -0700 (PDT) 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 Cc: Robin Murphy , Christoph Hellwig , Maxime Bizon , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Oleksandr Natalenko , Linus Torvalds , Marek Szyprowski , Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Olha Cherevyk , iommu , linux-wireless , Netdev , Linux Kernel Mailing List , Greg Kroah-Hartman , stable 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324193158.5fcae106.pasic@linux.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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.