Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6470100rwi; Mon, 24 Oct 2022 01:41:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7qjGVfK80TEh4gN6SegBhoPx5fqum2yvr9VmpeSUxu7hhxdMZETzwoldGmbmcarnzZoy9w X-Received: by 2002:a17:907:e88:b0:78d:fb98:6f5d with SMTP id ho8-20020a1709070e8800b0078dfb986f5dmr26910706ejc.5.1666600890757; Mon, 24 Oct 2022 01:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666600890; cv=none; d=google.com; s=arc-20160816; b=X6TgbQCgdx0nz7k8gm/fvWcsHS2bWiJBRQj6AbuMepqch4pkcBgHQxPT873GchWA8j 1EHubRZZr0M8Y7ZynujM8Hq6AN9vUHVH2JaWOx0hEgpiT63QuQ60d5OZ2xk281CT33pH WQLZW8UjbnyvcG6EhAV6P3kzU3ZEhlpvH0vzo4XSsYKFFO5k6mzxSjy9vlZZlb7gdUL3 Q5yu9THqnfOOWNq/jCmjZNctbGpgSWWWulbm7A51K1Cw3fbtk+4acBbDAQF+gF8hDjmA QrJ4PFEoaiEvZWrYO4FJeXEMgHAl5wDjhUcWZXMX/XpHMpCyYSisiE7HAeRf5rkFauTB gMkA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eDI2oC/Jr6d6JOexJAxW8yOYPdCtd6NfI008/PX5+FU=; b=edpuR7g8NF988zRgOY438gFYuWlyKU86yAUEMUtoPxCvObF1MkAF72InZ7NFieNNpK /XoGVZ8I4Lg9xTIX+gy+z5Zvjg306ocl/lQpHAcT/sFwcu7zN1i0n7yaP++1YrCt9Hbo 1CcwJ1iyEa6ZY0lHn6d0HbLmzeabArfXEPPLDjGQ493DeOXiIYrNgcp5Wg/PkgrvdT5W SmTNGh2tAgIbBVwMQT23Id3sfwJfAAjoI3G8KfgWOX2xpfnHx96TOdefO2lhmcyzA4Hw ymP7TW3gk9E5COW6RSxm5tpPZMF2W669QnntCi05YDsRUnHsTr183DXrlSh0xVAJhXD3 JPbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=fukTnkad; 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 z11-20020a05640240cb00b00461c43d1113si2926681edb.569.2022.10.24.01.41.05; Mon, 24 Oct 2022 01:41:30 -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=fukTnkad; 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 S229588AbiJXHwC (ORCPT + 99 others); Mon, 24 Oct 2022 03:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiJXHv7 (ORCPT ); Mon, 24 Oct 2022 03:51:59 -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 31D7B52DDD; Mon, 24 Oct 2022 00:51:57 -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-Transfer-Encoding:Content-Type: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eDI2oC/Jr6d6JOexJAxW8yOYPdCtd6NfI008/PX5+FU=; b=fukTnkadU0iMI3XPNFZ4K4HhIV qOUTbVcjOH9+WKra9lzUlGWqEZ3Bb+s1Xwas/tN/X0S/+UsUTiPlkIzegV+PeGMbf9QUQ07ad6I1w zk3Ipq5JIb6h53QGGB0vcSv/Y4ApzbE/S0IyhcUKgNfXQR+s9WuvoOa0LBhgyMSMIXXmZq4X1ua7G PvireKY/L9MYDkw4q4qKMFqAYT36knmX0wyBirzrVoFRPzBXd83UAfGpIHmvij/4WE02cLzrxo/5J HVpRGd8nr3Ox2I0uN2j4MIjvKqTyqJZAJRxKIR4vlWH+lyRcIQnSPDMYeSRj4lbAGMsmguF8j108g +93xqsiQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34924) 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 1omsFJ-0002hW-An; Mon, 24 Oct 2022 08:51:41 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1omsFC-0006xK-Fs; Mon, 24 Oct 2022 08:51:34 +0100 Date: Mon, 24 Oct 2022 08:51:34 +0100 From: "Russell King (Oracle)" To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Marcin Wojtas , Andrew Lunn , 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, jaz@semihalf.com Subject: Re: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent Message-ID: References: <20221022234024.87475-1-mw@semihalf.com> <20221024085102.15712ce9@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221024085102.15712ce9@thinkpad> 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 Mon, Oct 24, 2022 at 08:51:02AM +0200, Marek Beh?n wrote: > > Sure. In such a case the description of 380 variant (single core) > > should remain untouched. > > > > We need to decide what to do with dual-CPU, i.e. Armada 385/388. How about: > > - Don't change current behavior, i.e. perform a necessary kernel > > configuration in "arm,pl310-cache" driver, > > arch/arm/mach-mvebu/coherency.c + &coherencyfab:node in DT > > - Satisfy of_dma_is_coherent() by adding `dma-coherent;` in > > armada-385.dtsi only (IMO this would describe HW properly) > > ? > > It will describe HW properly, but someone running older kernel compiled > with no SMP support will see a performance drop. I wonder how many > people do that. If the kernel is built without SMP support, the page table entries will not have the shared bit set, and the system will _not_ be DMA-coherent. Having DT mark devices as "dma-coherent" in this case will lead to data corruption, because the DMA API will believe them to be DMA-coherent when the page tables are not setup for that to work. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!