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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76E6EC432C0 for ; Thu, 28 Nov 2019 16:38:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 33C672176D for ; Thu, 28 Nov 2019 16:38:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LsrY21O2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33C672176D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=i8kC/kslWuNJ0eoYHcfPpC6S7m1YplQAOSgp2dLn5Y8=; b=LsrY21O2JNnDLe Nu7K3GfyLmZOeZuo9iRsFETYWIAxFOcjFnytYnP5iJ37kaIECwQXbtMR1ABsObQ6GZ9A3fgSgJu0D /IpHXiAA9jD/ZTnm0AZgJ4Scfdr0F9D/RZGkqocq8AnELB2S0HI2jy5nsylrtevAGZ3i6gtadoV8l k4/ng5J/s/9Hj7NhtXzBRgyaed7VI6xEggjQMp5Un8UnWPAoumJSkISGZ0eS8sg2Q+DuUi2lnlc3w KKLS9qZPO54LgSo2eKueXK27S57PeN2hi2jJAcB5+8lfBaG8zO9v0kjGXBIg0xF96SzEjBBRGnOtp zwNz2/FEY0KrtYOvJIeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaMoP-0007tS-Hq; Thu, 28 Nov 2019 16:38:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaMoM-0007t8-PO for linux-arm-kernel@lists.infradead.org; Thu, 28 Nov 2019 16:38:36 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CB0E1FB; Thu, 28 Nov 2019 08:38:33 -0800 (PST) Received: from bogus (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7F273F6C4; Thu, 28 Nov 2019 08:38:32 -0800 (PST) Date: Thu, 28 Nov 2019 16:38:27 +0000 From: Sudeep Holla To: Robin Murphy Subject: Re: [PATCH] arm64: dts: juno: Fix DMA address translations by adding SOC bus node Message-ID: <20191128163827.GA28000@bogus> References: <20191126165355.6696-1-sudeep.holla@arm.com> <20191128141521.GA3333@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_083834_912149_E8CAFC3C X-CRM114-Status: GOOD ( 25.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rob Herring , Liviu Dudau , Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 28, 2019 at 04:15:43PM +0000, Robin Murphy wrote: > On 28/11/2019 2:15 pm, Sudeep Holla wrote: > > On Thu, Nov 28, 2019 at 11:50:54AM +0000, Robin Murphy wrote: > > > Hi Sudeep, > > > > > > On 2019-11-26 4:53 pm, Sudeep Holla wrote: > > > > Commit 951d48855d86 ("of: Make of_dma_get_range() work on bus nodes") > > > > reworked the logic such that of_dma_get_range() works correctly > > > > starting from a bus node containing "dma-ranges". > > > > > > > > Since on Juno we don't have a SoC level bus node and "dma-ranges" is > > > > present only in the root node, we get the following error: > > > > > > > > OF: translation of DMA address(0) to CPU address failed node(/sram@2e000000) > > > > OF: translation of DMA address(0) to CPU address failed node(/uart@7ff80000) > > > > ... > > > > OF: translation of DMA address(0) to CPU address failed node(/mhu@2b1f0000) > > > > OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) > > > > OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) > > > > OF: translation of DMA address(0) to CPU address failed node(/iommu@2b600000) > > > > > > > > Let's fix it by adding a SoC bus node and moving all the devices along > > > > with the "dma-ranges" inside it. > > > > > > > > Cc: Rob Herring > > > > Cc: Liviu Dudau > > > > Cc: Robin Murphy > > > > Cc: Lorenzo Pieralisi > > > > Signed-off-by: Sudeep Holla > > > > --- > > > > arch/arm64/boot/dts/arm/juno-base.dtsi | 162 +++++++++--------- > > > > arch/arm64/boot/dts/arm/juno-clocks.dtsi | 2 + > > > > arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 2 + > > > > arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 2 + > > > > 4 files changed, 88 insertions(+), 80 deletions(-) > > > > > > > > Hi Rob, Robin, > > > > > > > > Let me know if this is correct fix for the issue I am seeing with linux-next > > > > on Juno. This patch is generated with -b for ease of review. With lots of > > > > indentation, actual delta is: > > > > > > > > 4 files changed, 1274 insertions(+), 1266 deletions(-) > > > > > > Other than a few nits - the GIC should probably be under the soc node as > > > it's an MMIO device, while the clocks shouldn't; the dtsi's could probably > > > avoid churn with a "&soc {...}" phandle - I think this is a reasonable thing > > > to do, as it's generally the preferred structure. > > > > > > > I agree and am still in confusion as what to put inside soc or not. > > FWIW my understanding is that the "soc" node is used to provide a 'bus' to > represent on-chip MMIO - in principle we could nerd out and describe the > ACE-lite/AXI/APB slave interconnects in full, but there's really no benefit > to going into that much detail - so everything with a "reg" representing a > physical address goes inside it, while CPUs, clocks, firmware, regulators > etc. sit in the root node 'outside the PA space', regardless of whether > they're physically on-chip or not. > I saw few other DTs and they all keep interrupt-controller and timer outside this "soc" node. Timer is sysreg based, so makes sense. GIC has both sysreg and MMIO components so I was not sure if it's done like that due to some dependency on how interrupt-parent property is used. e.g. arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi I expect even the motherboard IO shouldn't go inside it but again to avoid churn I kept it inside. I agree on firmware, clocks, regulators,..etc. I wanted to keep the churn minimum and it was not completely aligned to the principles you mentioned above. Anyways it's better to fix it in right manner for next cycle. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel