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 E7777C4321E for ; Fri, 2 Dec 2022 10:55:33 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EjXK8qSZ17cfh42/DpkXjJ/XwsWIWXtJ2MwOTlt6YXY=; b=KprAVBVOr13G7g /fYdKy+s/HG/oweXzqs0hdNpHVB07TlmtQnOFDpLGBTbsgV40df0rQaLCPqZgc5P57noyL0D+jd3q xcuToflNJ4R6z9geRx0GhDJblwMS0iWZjzrGdO3EPKOH0c61K+AbxWV1fqJ+e54/TwtKrCZEUz8X9 OcW5TG3/C34kmGu2B/+gouHX4+0yfhEERozFHHo5TL2Hx4871VcGBILuMrDl4z7903x4kWZW9ARCj cSCzp4JDyzWMUlybfcBndUhaw+LonbyUxNYUmWTYgiCcp1sakI5DD2Gh1JJi1RdpkqZtZmZf7ATD2 a4f+Cv+qjAMm5Oj0g37w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13gS-00FlJI-QA; Fri, 02 Dec 2022 10:54:21 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13gM-00FlDG-QF for linux-arm-kernel@lists.infradead.org; Fri, 02 Dec 2022 10:54:16 +0000 Received: by mail-pj1-x102a.google.com with SMTP id cm20so4582544pjb.1 for ; Fri, 02 Dec 2022 02:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=87xJ37nY6S8gWCE8fBJ5L7O3V8ksDd+rlKQ9M8Zl788=; b=uUHv3AJ7VaCpRzS1HBAjRlglZSkNl0PxQgPX6vJPHIwbKyFm/frG6lqLOVK6s7TRv/ 0NouhTV4G31CjYEPZch3UibLYVMEW5m0FfDfV3GaaLXug/bmyOb0CzpvpDzc2vJzDjLr zlwiiRcPGtLYgc5eY7LMHskyOr6a5uqRU8W+282dAvSPxPFX+rH8HozAedTbgTBwgiFU crH2tyK6qkw/Wq+ngaN+z7BVS0qso4UoDc4PJMBvkgNSTOXuvQ4JlbVy66VgabXcXvhD jyMev/cykbECybYt2nbwZplNbh9hR+oF1roOkNjO7f/IF+Nc9oOF+7Mwrqy23BK7LLuD x5rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=87xJ37nY6S8gWCE8fBJ5L7O3V8ksDd+rlKQ9M8Zl788=; b=wUM3v6t7rJX4YdFiDz9y05WHDsUUGeDgLwVlFprCHxuapX0FrNyW5Ygs3CMaZ+OZb/ 0QXTgFp5BtEyvXvkpeVvVZ3WpRJbMjQ/J+TTcLpaMSJRviO5Lgp4Ea00Mw35e/7mPEcu 2qPcaxasF9VpdyG/cQ7+aJvtQkREhWIFPBGa86Uyj9s9ZiYGY4j9YSqM/YY6pOz6PnW9 EVdlBkDyUnkc3HEmXWGvtQNOlh1XqnLAYowa+SKvC31xSHy6Vq3dH2/9JxZjbwVw8m2s eaeHu4yanebCgU7BTcjbHuz2/R1AbbcK4bot/pRXauKqn13k/xWtPuW3P8k79CxOw6On Pv6Q== X-Gm-Message-State: ANoB5plvV50ry9x5+En1nlTS2eOelgmsJFr+q/uAtmG+GbN/JFB5TRmW 2tMWm9MLgojg/w3ZuHETAs0C X-Google-Smtp-Source: AA0mqf7QTy9EvaVhH/QvvAaAlAR4rnIOPV5LVSxdoViAUPyb844tJpq+NtFQcLI6bRfQBzfoDPipIQ== X-Received: by 2002:a17:90b:2801:b0:200:2069:7702 with SMTP id qb1-20020a17090b280100b0020020697702mr76236667pjb.239.1669978451512; Fri, 02 Dec 2022 02:54:11 -0800 (PST) Received: from thinkpad ([27.111.75.154]) by smtp.gmail.com with ESMTPSA id v3-20020a170902e8c300b0017f59ebafe7sm5246857plg.212.2022.12.02.02.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:54:10 -0800 (PST) Date: Fri, 2 Dec 2022 16:24:03 +0530 From: Manivannan Sadhasivam To: Will Deacon Cc: Thorsten Leemhuis , Amit Pundir , Catalin Marinas , Sibi Sankar , Robin Murphy , andersson@kernel.org, sumit.semwal@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hch@lst.de, gregkh@linuxfoundation.org Subject: Re: [PATCH] Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()" Message-ID: <20221202105403.GG5356@thinkpad> References: <20221118105402.GA184726@thinkpad> <20221118123349.GC3697@willie-the-truck> <20221121064224.GB11945@thinkpad> <018517b8-0ae0-54f5-f342-dcf1b3330a13@quicinc.com> <6d637906-e1d5-c481-a73d-2b2b845e223b@leemhuis.info> <20221202100357.GB29396@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221202100357.GB29396@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_025414_912292_BA1F75CD X-CRM114-Status: GOOD ( 48.59 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gRnJpLCBEZWMgMDIsIDIwMjIgYXQgMTA6MDM6NThBTSArMDAwMCwgV2lsbCBEZWFjb24gd3Jv dGU6Cj4gT24gRnJpLCBEZWMgMDIsIDIwMjIgYXQgMDk6NTQ6MDVBTSArMDEwMCwgVGhvcnN0ZW4g TGVlbWh1aXMgd3JvdGU6Cj4gPiBPbiAwMi4xMi4yMiAwOToyNiwgQW1pdCBQdW5kaXIgd3JvdGU6 Cj4gPiA+IE9uIFRodSwgMSBEZWMgMjAyMiBhdCAyMzoxNSwgQ2F0YWxpbiBNYXJpbmFzIDxjYXRh bGluLm1hcmluYXNAYXJtLmNvbT4gd3JvdGU6Cj4gPiA+Pgo+ID4gPj4gT24gVGh1LCBEZWMgMDEs IDIwMjIgYXQgMTA6Mjk6MzlBTSArMDEwMCwgVGhvcnN0ZW4gTGVlbWh1aXMgd3JvdGU6Cj4gPiA+ Pj4gSGFzIGFueSBwcm9ncmVzcyBiZWVuIG1hZGUgdG8gZml4IHRoaXMgcmVncmVzc2lvbj8gSXQg YWZhaWNzIGlzIG5vdCBhCj4gPiA+Pj4gcmVsZWFzZSBjcml0aWNhbCBpc3N1ZSwgYnV0IHdlbGws IGl0IHN0aWxsIHdvdWxkIGJlIG5pY2UgdG8gZ2V0IHRoaXMKPiA+ID4+PiBmaXhlZCBiZWZvcmUg Ni4xIGlzIHJlbGVhc2VkLgo+ID4gPj4KPiA+ID4+IFRoZSBv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GlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDov L2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVsCg== 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 3E49FC4321E for ; Fri, 2 Dec 2022 10:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232760AbiLBKzO (ORCPT ); Fri, 2 Dec 2022 05:55:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233255AbiLBKyq (ORCPT ); Fri, 2 Dec 2022 05:54:46 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13CCCD3793 for ; Fri, 2 Dec 2022 02:54:12 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id b11so4585670pjp.2 for ; Fri, 02 Dec 2022 02:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=87xJ37nY6S8gWCE8fBJ5L7O3V8ksDd+rlKQ9M8Zl788=; b=uUHv3AJ7VaCpRzS1HBAjRlglZSkNl0PxQgPX6vJPHIwbKyFm/frG6lqLOVK6s7TRv/ 0NouhTV4G31CjYEPZch3UibLYVMEW5m0FfDfV3GaaLXug/bmyOb0CzpvpDzc2vJzDjLr zlwiiRcPGtLYgc5eY7LMHskyOr6a5uqRU8W+282dAvSPxPFX+rH8HozAedTbgTBwgiFU crH2tyK6qkw/Wq+ngaN+z7BVS0qso4UoDc4PJMBvkgNSTOXuvQ4JlbVy66VgabXcXvhD jyMev/cykbECybYt2nbwZplNbh9hR+oF1roOkNjO7f/IF+Nc9oOF+7Mwrqy23BK7LLuD x5rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=87xJ37nY6S8gWCE8fBJ5L7O3V8ksDd+rlKQ9M8Zl788=; b=YSIcISIeQXV6Bng2D8mhDxFWZw/X5u1vzTBupgzg56Y4ORFCbrcf8ZEKbidhlhsjIj ZKpfiTFU72R36+eHANRU+s1nD9A4cr0L2NH+5c3Zwdycw8Q7+z9T+3ycCfaTrL7MyGUf AqLRQ8/qQjkRbqgdLs79EhAPY2gXimmcMn1ZN0YZyJzPoGGSY9Lrp8RVilJwL6RUX7fP Jj6wCXjSeMNSZl4fjP03KwFdI53Bypr9dTeHApYEl2lPewvZAN+OeeyJP6u2yf0xqr7G lFHTfblbJ6+9QUw8PnGydORTdYFUJ7bZSRBERKhgx/PSOP7j/kBShuZpQhANjK8dJ9pb JbaA== X-Gm-Message-State: ANoB5pkb3QN4kwSOTXNFfygPBR/gtdDnKBP1qERCfuwOE38BISPmA4es 3WrAHIhL1apFZQbM7D4dnw3i X-Google-Smtp-Source: AA0mqf7QTy9EvaVhH/QvvAaAlAR4rnIOPV5LVSxdoViAUPyb844tJpq+NtFQcLI6bRfQBzfoDPipIQ== X-Received: by 2002:a17:90b:2801:b0:200:2069:7702 with SMTP id qb1-20020a17090b280100b0020020697702mr76236667pjb.239.1669978451512; Fri, 02 Dec 2022 02:54:11 -0800 (PST) Received: from thinkpad ([27.111.75.154]) by smtp.gmail.com with ESMTPSA id v3-20020a170902e8c300b0017f59ebafe7sm5246857plg.212.2022.12.02.02.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:54:10 -0800 (PST) Date: Fri, 2 Dec 2022 16:24:03 +0530 From: Manivannan Sadhasivam To: Will Deacon Cc: Thorsten Leemhuis , Amit Pundir , Catalin Marinas , Sibi Sankar , Robin Murphy , andersson@kernel.org, sumit.semwal@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hch@lst.de, gregkh@linuxfoundation.org Subject: Re: [PATCH] Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()" Message-ID: <20221202105403.GG5356@thinkpad> References: <20221118105402.GA184726@thinkpad> <20221118123349.GC3697@willie-the-truck> <20221121064224.GB11945@thinkpad> <018517b8-0ae0-54f5-f342-dcf1b3330a13@quicinc.com> <6d637906-e1d5-c481-a73d-2b2b845e223b@leemhuis.info> <20221202100357.GB29396@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221202100357.GB29396@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 02, 2022 at 10:03:58AM +0000, Will Deacon wrote: > On Fri, Dec 02, 2022 at 09:54:05AM +0100, Thorsten Leemhuis wrote: > > On 02.12.22 09:26, Amit Pundir wrote: > > > On Thu, 1 Dec 2022 at 23:15, Catalin Marinas wrote: > > >> > > >> On Thu, Dec 01, 2022 at 10:29:39AM +0100, Thorsten Leemhuis wrote: > > >>> Has any progress been made to fix this regression? It afaics is not a > > >>> release critical issue, but well, it still would be nice to get this > > >>> fixed before 6.1 is released. > > >> > > >> The only (nearly) risk-free "fix" for 6.1 would be to revert the commit > > >> that exposed the driver bug. It doesn't fix the actual bug, it only > > >> makes it less likely to happen. > > >> > > >> I like the original commit removing the cache invalidation as it shows > > >> drivers not behaving properly > > > > Yeah, I understand that, but I guess it's my job to ask at this point: > > "is continuing to live with the old behavior for one or two more cycles" > > that much of a problem"? > > That wouldn't be a problem. The problem is that I haven't see any efforts > from the Qualcomm side to actually fix the drivers so what makes you think > the issue will be addressed in one or two more cycles? On the other hand, if > there were patches out there trying to fix the drivers and we just needed to > revert this change to buy them some time, then that would obviously be the > right thing to do. > There are efforts going on to fix the driver from Qualcomm. It's just that the patches are not available yet. The delay is mainly due to the internal communication that should happen between the internal teams. The fix would be use a separate no-map carveout for the usecase. But it'd be good to revert this patch untill those patches get merged. Thanks, Mani > > >> but, as a workaround, we could add a > > >> command line option to force back the old behaviour (defaulting to the > > >> new one) until the driver is fixed. > > > > Well, sometimes that approach is fine to fix a regression, but I'm not > > sure this is one of those situations, as this... > > > > > We use DB845c extensively for mainline and android-mainline[1] testing > > > with AOSP, and it is broken for weeks now. So be it a temporary > > > workaround or a proper driver fix in place, we'd really appreciate a > > > quick fix here. > > > > ...doesn't sound like we are not talking about some odd corner case > > here. But in the end that would be up to Linus to decide. > > The issue is that these drivers are abusing the DMA API to manage buffers > which are being transferred to trustzone. Even with the revert, this is > broken (the CPU can speculate from the kernel's cacheable linear mapping > of memory), it just appears to be less likely with the CPUs on this SoC. > So we end up in a situation where the kernel is flakey on these devices > but with even less incentive for the drivers to be fixed. > > As well as broken drivers, the patch has also identified broken device-tree > files where DMA-coherent devices weher incorrectly being treated as > non-coherent: > > https://lore.kernel.org/linux-arm-kernel/20221124142501.29314-1-johan+linaro@kernel.org/ > > so I do think it's something that's worth having as the default behaviour. > > > I'll point him to this thread once more in my weekly report anyway. > > Maybe I'll even suggest to revert this change, not sure yet. > > As I said above, I think the revert makes sense if the drivers are actually > being fixed, but I'm not seeing any movement at all on that front. > > Will -- மணிவண்ணன் சதாசிவம்