Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5656911rwi; Sun, 23 Oct 2022 09:35:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uR7jcoNkfep109I6Z5pCYo82QUncxrxfbFxWRU4EszaVdZ5qQqqNK+oCU+A5xHJdLmh8L X-Received: by 2002:a05:6402:3645:b0:45f:e918:9f35 with SMTP id em5-20020a056402364500b0045fe9189f35mr18015804edb.118.1666542917388; Sun, 23 Oct 2022 09:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666542917; cv=none; d=google.com; s=arc-20160816; b=N79jOJcl0SqHdUyCsAkKyvTiHV6DnBSPxj6ZtVlf8xwSyaiKgTGqL4kNaW6/kuifss m8Xb1Zmy3trEimVG1F2pzhyr1jT0GJV+iOcN/WPh6Oi95ZNBAdbC4Lwg2ErJtuXZ0mFH TAr54ez3Dxzy9r78pHc8mEAZIvkHUecUtJs9AH98v5llctR94qnk6g2ZFOadfrGegcK6 cgn1AtISzCOyzsxTXZsdjST/paNgV9ScPNf5n1ndWhUtSc5mR1YxdUdfCvavpsWMnEw5 lql+a2xlae5WX+PDTi0mE7VVGyPXP/aa4b1VsG/ObnbIicTu7LtRwiib7rnFaqhvGtC1 hG4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=iTvQ2cWB+6XWNFX3zk4Auk9RwK12kn68XHvnKVvYeIU=; b=sVdq8ncMNbOtf7bwFynyWQmAsnxVQqb8ZkZlb6g+njwJnP5bDtQQTh7lT/nvaUp3rk Q6l2Vx0GO2UUuTdxWVCrBfw9rfVwf9vnh4vYx/p6H0tpQpZjdDy8+vL/LSLamljzVslx U4tFwnGY4jWJBaDvt3B4a+q7Q8u8Sj6whNWwKgdQSVMLuAbSWpxilUWpDOYUXjtMUU30 sQrZYYaScyNoowHnFWa8Za15CKy1+QImzpv+EM24iEtF4c3QtU/BtNB3QZu021Ds0b64 p6Kl6Bx+cDyE9ydMT0zreQpz44hVR9WKRDlIeJsyTe+u7iY4ZRJE81kJvYIQcchvpum1 skqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=OGBR4fee; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa19-20020a170907869300b007a6c5a23a48si1422212ejc.551.2022.10.23.09.34.52; Sun, 23 Oct 2022 09:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=OGBR4fee; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbiJWQVK (ORCPT + 99 others); Sun, 23 Oct 2022 12:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbiJWQVI (ORCPT ); Sun, 23 Oct 2022 12:21:08 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B972C5B9FA; Sun, 23 Oct 2022 09:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iTvQ2cWB+6XWNFX3zk4Auk9RwK12kn68XHvnKVvYeIU=; b=OGBR4feeWffQUhNajVMj1osao1 bbXJNZtpEk7wHN8vAYkuJvGHtqMJxuYYmYCrLXA3/CU0G6VNxEWg8DL0S+1quagLailQHNnbdQihr LOyVtzOphlaUcztOauPh5pOB3Y5Bb7RLaEjDeHw6TLWmjfXBWBQNCXepUnjnCIksIxnwxGi/jwTnH e401yO+MqpbUPb8TO+IPti9FDtC4JRfEErt+3CiLCoQ77FYzXMpLMwJwcGhEmnMzzfutmkelXEz2j Op3bnPo7QScQR4FZoAZVNOvBEOpRGb/UVap49VxOOLGp/6McjA3aiavsWjx8jG29hcztzspgDhAFe +VTBRz7A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34910) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1omdiY-00027Q-UQ; Sun, 23 Oct 2022 17:20:54 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1omdiS-0006DU-On; Sun, 23 Oct 2022 17:20:48 +0100 Date: Sun, 23 Oct 2022 17:20:48 +0100 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Marcin Wojtas , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, hch@lst.de, kabel@kernel.org, jaz@semihalf.com Subject: Re: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent Message-ID: References: <20221022234024.87475-1-mw@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham 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-kernel@vger.kernel.org On Sun, Oct 23, 2022 at 05:04:01PM +0200, Andrew Lunn wrote: > On Sun, Oct 23, 2022 at 01:40:24AM +0200, Marcin Wojtas wrote: > > Armada 38x platforms marks all devices as coherent via > > mvebu_hwcc_notifier(), whereas the standard way to determine > > this is by of_dma_is_coherent(). Reflect the hardware > > capabilities by adding 'dma-coherent' properties to the device tree. > > Hi Marcin > > Does this need to go to -rc for 6.0? The DMA issues being reported? > If so, please add a Fixed: tag. Are we absolutely sure this makes sense? Looking at atch/arm/mach-mvebu/coherency.c, there are dependencies on stuff such as whether the kernel is in SMP mode or not (because the page tables need to be appropriately marked as shared for coherency with IO to work). We only enable the shared bit if we're in SMP mode because (a) its difficult to do at runtime due to TLB conflicts (requires switching the MMU off, rewriting the page tables and switching the MMU back on), and (b) setting the shared bit for CPUs that don't need it _can_ result in the CPUs basically bypassing their caches and thus kill system performance. So, if we have Armada 38x platforms that are operated in uniprocessor mode, this patch can cause havoc on such a setup. I would suggest utmost caution with this approach. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!