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 D021AC433F5 for ; Tue, 4 Oct 2022 09:23:28 +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=qWaDe7PspZzAyRZwGCEzOdBaAS7vn9nh0/7rB65oBy8=; b=dAxV3Ijn45E3vZ RBVgScJtpdFg2XWgxATVf4Q4u+EP/8chIWM0D46c9anX6G7b2qWYLqSsHZTVaWY2MSeUveFTcPgP4 j+ZfsU7HHMYjCPpEhqbr9m7IUB+ZcfCQO1BODiGdqNPUT0NN6HXUn+vohNnpXyuzKaupT6s9Sx8ob t6IMnzIr80LWYakH3EszNUDmZi0I738axMRwTqi9C+N2VtssMJg7tuwYumfEV8rxaUHnQEgwgi9sh +mrVQE8oxelZLD5XEov/LziViKj5eMpjKYn206XzQ8ENEjwqJclel4OGR+lomRyTCj4Vd+RHVjxSz cZRTP8PGmNxbmf4pdVUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofe87-0096YA-TD; Tue, 04 Oct 2022 09:22:24 +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 1ofe84-0096Wj-M2 for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 09:22:22 +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=tclWkGFxoA8u9tzYV2Ca09ysN/UxMFXGdQ3EV041c7A=; b=PdMXOQ+K/9W9d1myOlxhdqgP3W bvCKVP5y1odIftnT8uq6c+va7lnlRMw8fK/l79vYsN6s6uQW+HdCsl2otIEtWTtiqvWb0UoZ/Pu72 lQpP9GbqBIUqLeZGtrptdNXtgNrKcelUUwMsW5/qvhQdlvODPaM7WrpHKWOwiHulvJ5GRtjUvM8Ew 6JNVyLQpgb76WKmrzbFfI2+P/VX4lN533v48O8Lzcxy8qc5+WZEJUoRNN7/UIjRl36JYEwJF3QOKn s48ZlOjID8lJD5SLmm81jJhzhDwY8UYrAF0TauBk9bJfo2tgaHbchshZGkjittFj3SBJQ2+kT7MmC MoXT2hWw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34578) 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 1ofe7s-0007tK-WB; Tue, 04 Oct 2022 10:22:09 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ofe7q-0004HH-Oo; Tue, 04 Oct 2022 10:22:06 +0100 Date: Tue, 4 Oct 2022 10:22:06 +0100 From: "Russell King (Oracle)" To: Thorsten Leemhuis Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Christoph Hellwig , Marcin Wojtas , pali@kernel.org, Robin Murphy , Arnd Bergmann , Andre Przywara , Marc Zyngier , Linus Torvalds , Andrew Lunn , Gregory Clement , Greg Kroah-Hartman , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ARM: mvebu: select OF_DMA_DEFAULT_COHERENT if MACH_MVEBU_V7 Message-ID: References: <20221004081723.31739-1-kabel@kernel.org> 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-20221004_022220_741282_6E35D6CA X-CRM114-Status: GOOD ( 20.18 ) 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 Tue, Oct 04, 2022 at 11:14:55AM +0200, Thorsten Leemhuis wrote: > On 04.10.22 10:17, Marek Beh=FAn wrote: > > Commit ae626eb97376 ("ARM/dma-mapping: use dma-direct unconditionally") > > caused a regression on the mvebu platform, wherein devices that are > > dma-coherent are marked as dma-noncoherent, because although > > mvebu_hwcc_notifier() after that commit still marks then as coherent, > > the arm_coherent_dma_ops() function, which is called later, overwrites > > this setting, since it is being called from drivers/of/device.c with > > coherency parameter determined by of_dma_is_coherent(), and the > > device-trees do not declare the 'dma-coherent' property. > > = > > Fix this by defaulting to dma-coherent for this platform in the > > of_dma_is_coherent() function, if neither dma-coherent nor > > dma-noncoherent is declared. > > = > > Fixes: ae626eb97376 ("ARM/dma-mapping: use dma-direct unconditionally") > > Link: https://lore.kernel.org/linux-arm-kernel/20220930151028.0e518421@= dellmb/ > = > Thx for taking care of this. One quick note: You might want to add a > "Cc: stable@..." on the patch to ensure it's backported in a timely manne= r: > https://lore.kernel.org/lkml/YwZmu1ZTbjVqIY%2FC@kroah.com/ Sadly, this isn't a valid fix for the problem - as Christoph points out, mvebu is part of a multiplatform kernel, and selecting options that harm other platforms on a multiplatform kernel can't be allowed even if it fixes a regression. It will cause a regression for other platforms. So, this needs fixing a different way, and there are other discussions concerning an alternative 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