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 B96BFC3A59D for ; Mon, 24 Oct 2022 07:53:15 +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=LaO/smeAAHX5joZnQ/eLSYuDZmi/dPmnXkDfVXaAZh4=; b=q5RxDMaKT0016F ryE2xwfFQxKnG2aNW08zIPUPWGqsyxZHKzJjv861QZJyqlafCz3OCGZGeiAVb9c6SzNTCvWXHF7a+ pegSaTLoEsIcUbeOUnyaw6CK0gqGjKjocApm83f7c29rgzl6t8yuE+YOp0hcx2jWKVJpSvX1icmcB 5mUxMiW3XMncIKXxTB/C0NnHn/rIYc0B8Ql9EcHo7zCPd6zeTDzS/BGszaV4EJyBR3Qzx+IrZtL4u ASY4+jKDvv/ZFD9ts7+kbxMcMlPursnBoTdYkkvbIIzf+/uTK4SJ+c7oa53/0+161f7RNU4qmzNtm /udjHKlbMWYgSmu4Rqiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omsFg-00HYab-Nc; Mon, 24 Oct 2022 07:52:04 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omsFd-00HYZR-QU for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2022 07:52:03 +0000 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-Disposition: inline In-Reply-To: <20221024085102.15712ce9@thinkpad> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221024_005201_895327_693DE0AE X-CRM114-Status: GOOD ( 15.45 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 24, 2022 at 08:51:02AM +0200, Marek Beh=FAn 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 ab= out: > > - 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel