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 46BEEC433FE for ; Tue, 4 Oct 2022 08:31:46 +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=pHjdEWtzDoZdAqP/WSsQkdQAY/hHXhbCkBMSVmyVvzo=; b=AxQrrwOyeov1pQ pP9d9b+hLYASSYe4rP5X3LTPicDeGY2hZW/VCyG3H1WgYVOmBK9sl1cEdc4SIZvAfTJusYjieAK6a S1QvItj4bijGnrGLbkgBBCm0P3qccqf6PnyG8KWED7m1VrIhqpxGQfYTYDhM8enoyEQGfgn8J+RRk MSSckXBqZxGZCqZPwaBBluiBn+dAVKPgM8HQxdUonCObP6VdaaBH1FysMWyWfEUoGeDkNUSuVPcdL s2X6+IDFw8rLGbgIq/RSdhiZi2qz7P06AMIOBnc6aGm6AUQLw6D2fZMEIVVdsvHzlJYrMbYdf0Hfw qYqkNNfmEqfgfLaNclsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofdJo-008wnC-UF; Tue, 04 Oct 2022 08:30:25 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofdJm-008wlC-BO for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 08:30:23 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 5EDEF68B05; Tue, 4 Oct 2022 10:30:11 +0200 (CEST) Date: Tue, 4 Oct 2022 10:30:10 +0200 From: Christoph Hellwig To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Christoph Hellwig , Marcin Wojtas , "Russell King (Oracle)" , 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: <20221004083010.GA2312@lst.de> References: <20221004101502.5cbffc63@thinkpad> <20221004081723.31739-1-kabel@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221004081723.31739-1-kabel@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_013022_563759_D796F9FA X-CRM114-Status: GOOD ( 16.53 ) 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 10:17:23AM +0200, 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. Can't mvebu be part of multi-platform builds that would be broken by this change? Also if we do this, shouldn't we also remove the notifier that set ->dma_coherent? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel