From patchwork Thu Jan 17 04:29:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10767513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39F021390 for ; Thu, 17 Jan 2019 04:30:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C442F00A for ; Thu, 17 Jan 2019 04:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27EAA2F00E; Thu, 17 Jan 2019 04:30:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7F4E2F03B for ; Thu, 17 Jan 2019 04:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728833AbfAQEa0 (ORCPT ); Wed, 16 Jan 2019 23:30:26 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42416 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728850AbfAQEaZ (ORCPT ); Wed, 16 Jan 2019 23:30:25 -0500 Received: by mail-pl1-f194.google.com with SMTP id y1so4097279plp.9 for ; Wed, 16 Jan 2019 20:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vZo7ET0lBcl98JX6n/hCp1L5/IwM2yp7Eu4Ugyh+OIo=; b=XN7s/G0wGq4Q8Pt4pGw4MjLsp5mCP3s07xqBBVc5Nfh0AvDP2DL81flh6lPc4EQT/A VNPmUxdTUqczhWZxpUmkimKa7I10yHYQDmcnUl07S8J0MxyIOmr3OaP5jsQtVBJ6D+0J iI0p9/nH+G9myREnQ+Km+t8qUi1xW47t6co70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vZo7ET0lBcl98JX6n/hCp1L5/IwM2yp7Eu4Ugyh+OIo=; b=AoOZdajGjvw/csIv2Gn9oQvjOkWmo/U6cgUgao9I3utE7917LC59PDDG0LvjLwFhUk EHc8P0McZQnc7BOTqN21jcgMQoe4ImpF5M9G49Svm04rzF8kJbt2TxEXLO6bLyu+doDu vuGPfhQTEAy2i3G6wwUK68zqZF+Kt43ASqD6wRjRrBWD59w1lk3wfGi+6iV72gqIyeD3 yuiyHnknuOAzUmE+ULMCXY80RlbT57YWucT9Jvm4iNeHsL8Js9TyE04PTb2wCYu9arP+ IpCU1V8l49bm5Jb9rOZWCdr6ZR8Ss9Ln1Hj5V2iLPAxuDeuz8Ty3YyIBXy2HP3Zhrgbl PiyA== X-Gm-Message-State: AJcUukdemmncshAXl/Gwu6bqsw37HTnMYaUAWXH1YfqBn2dr8JXAYB0M AbDndPouuNJvrCPhv5Z/VKH6yQ== X-Google-Smtp-Source: ALg8bN6AQqW3kkTSM1Spd6aZnzp61mfoJLH241AG/3wJT8w7WHIARW/7uW1xacDtPocHYhToTS8RcQ== X-Received: by 2002:a17:902:bc81:: with SMTP id bb1mr13188760plb.223.1547699424480; Wed, 16 Jan 2019 20:30:24 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id d6sm361574pgc.89.2019.01.16.20.30.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 20:30:23 -0800 (PST) From: Bjorn Andersson To: Andy Gross , David Brown , Rob Herring , Mark Rutland , Stephen Boyd , Doug Anderson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/2] arm64: dts: qcom: sdm845: Extend ranges and describe DMA space Date: Wed, 16 Jan 2019 20:29:40 -0800 Message-Id: <20190117042940.25487-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190117042940.25487-1-bjorn.andersson@linaro.org> References: <20190117042940.25487-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For devices attached to an IOMMU, translation between IOVA and physical addresses is no longer 1:1 and dma-ranges should be specified to describe the available IOVA address space. On SDM845 the busses are implemented with 36 address bits, so dma-ranges must be defined to reduce the size of the IOVA address space from the 48 bits supported by the SMMU. Without this DMA allocations may end up with IOVAs outside the valid range, that gets truncated by the bus between the device and its translation unit. Also extend ranges to describe the available address space. Signed-off-by: Bjorn Andersson Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Stephen Boyd --- Changes since v3: - Split this out from patch 1. - Rewrote commit message from scratch arch/arm64/boot/dts/qcom/sdm845.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 9867d42dc836..143c5af32e7b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -353,7 +353,8 @@ soc: soc { #address-cells = <2>; #size-cells = <2>; - ranges = <0 0 0 0 0 0xffffffff>; + ranges = <0 0 0 0 0x10 0>; + dma-ranges = <0 0 0 0 0x10 0>; compatible = "simple-bus"; gcc: clock-controller@100000 {