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 7362BECAAA1 for ; Sun, 23 Oct 2022 16:22:12 +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=vZNM06/4qBdqDuWW1zPZcuLjCfekaCgnuJuCLte8IBM=; b=q8pU631zfKJ7l2 aYiFbRfVkKUg+VDLbRRGgQH0JPbgiGvmwnJ2vgOU74jXCpcDF6a9Sy7qZSj1r9Li3bC7yVFGIprO4 O5Eb/49yrKrODC/Ur7iuCnUzjBV1AtomCMFYPNCoQA562Si/jVIHKFCqKkkO8JJ4vFt52yPZre6qx tXBSr43bPewiNmKp9jGZgThFFFp2pwhW92UWc7medL0Cv7rYHMLbMQQuf2/OZr1MLGg5KeQhuC3o1 uQ9PVf8RoJnoiWEg8kfL2KocD2szHD+I+hxe57yolabSAPXIeRUlw7Ti2stuP/VPT/F8IijyLenE4 iXvzAUrN0x3RjiGDZ5Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omdio-00Fgtf-0S; Sun, 23 Oct 2022 16:21:10 +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 1omdih-00FgsT-3W for linux-arm-kernel@lists.infradead.org; Sun, 23 Oct 2022 16:21:07 +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-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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221023_092103_187765_01533EA4 X-CRM114-Status: GOOD ( 16.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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel