From patchwork Tue Oct 4 08:17:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12998010 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 EE951C433FE for ; Tue, 4 Oct 2022 08:18:52 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oYJQd1zUwtORiD/UjInvZEAsT0xYlHyE/UWUAvwSep4=; b=3xmaChHj2tLreT LJpHnPaLSXcKSEsChBbJkRa3glJXbwRrvdRIZS9Z3Llyi5foCbIVRUWl9vFO8r5hLnhghPWMmAaP5 qS0RZWmOzeQardv0CtA4RKfONMSZXy/Gh/crXKc+dgV9m33He3kM0QIGonjY/8Sg3Bhrzj4YHcqjs aYFphZsPyQSEcM5gCR5nl6ygv+ss3I8mbfKlIGn4z0UB5Zm4spSW7k4K1mk7iWe8lMxC/E9x8Z57w 26XOiwNyw5oFbCkwmVDT7zEsdRt9J/HOwrgOO12WQoxNWgXyKMTBqfYIx9MhGA0oKwfCDbKx/OVsb +ZpIxvTT8tnrTJg5bB1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofd7a-008u2L-5N; Tue, 04 Oct 2022 08:17:46 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofd7X-008tzr-EC for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 08:17:45 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 93491CE0E89; Tue, 4 Oct 2022 08:17:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1655FC433D6; Tue, 4 Oct 2022 08:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664871455; bh=CLRnnx9yg4/3HKwBXmosTmnjjLe+WxBMcOd/F1/ht8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OjO00a0bhId32Q3OF0ySy7SGHwI6rNvtMDIH/ljeJ3Q9UDsIdlMn0L7IVQqJLuMTM GEwqMiCY+Pm4lwrio1OL3XgY7hQW1pC9wLRr587rvHFFXqvn0OqVHVQ335qWSHfjZf 1Rfj2qMB4rWJmlnaCyP6SlUGd5KgZE1vBpqm8g6bzedoaHrpnfnwf6kR25o9S0Idu6 PMdbVTiNqFyo0Xf7e1DTxW91wpR2+qbfCCSIKCju2VHItl3WfuWTiEpfNFRI+zQZcE bTOaObxIbc8w3z+yhaBwW+0Le9iDMKcumWJtNp3kIc/sTr4R1pkfrj8Wxsa64pPg3N 9LW0tgGmWt8iw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Christoph Hellwig Cc: =?utf-8?q?Marek_Beh=C3=BAn?= , 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: [PATCH] ARM: mvebu: select OF_DMA_DEFAULT_COHERENT if MACH_MVEBU_V7 Date: Tue, 4 Oct 2022 10:17:23 +0200 Message-Id: <20221004081723.31739-1-kabel@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221004101502.5cbffc63@thinkpad> References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_011743_679698_7B19A0AB X-CRM114-Status: GOOD ( 13.35 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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/ Signed-off-by: Marek BehĂșn --- arch/arm/mach-mvebu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 9f60a6fe0eaf..846a5c6e1a5e 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -23,6 +23,7 @@ config MACH_MVEBU_V7 select ARM_CPU_SUSPEND select MACH_MVEBU_ANY select MVEBU_CLK_COREDIV + select OF_DMA_DEFAULT_COHERENT config MACH_ARMADA_370 bool "Marvell Armada 370 boards"