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: 155788 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1492282jaa; Wed, 16 Jan 2019 20:30:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN6QgunKozXhYkSmZY//DOEqV8M7m/JxCsiG81DJgk80BnUNOzjs+vYXLNsesCC9FvBa2Q1B X-Received: by 2002:a62:2781:: with SMTP id n123mr13564694pfn.138.1547699430054; Wed, 16 Jan 2019 20:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547699430; cv=none; d=google.com; s=arc-20160816; b=tMvJtzwqWtZFqyqYpIOwg936CV7AHpyF+XkojzeirLYWR2gGn+LWqsODReMMZ7LGag 3wqu6c3cJwHsU4U0gEtUzGwKwfKvKG2tcPeuZsKxwCMk6R+eAvxsOm3Ij0S9NYaTehyJ WTnGjOZRLi17ZPmQ/uTl6nbRftHChC2/jjV/qvegPd1zaR58Dp/1cYjnU25VppV6nNxA /VavWkVsOJzdrKVF79AEx59XP72+qVzvq7jyCn7OorVZXx7ZYh2oqaSv8QzCKxHmEIH5 ULKWdIhWftWFVZfSzqIzktmIYrSvjhssqRnYwO/pdTbkmZPI1SPbU/1NR3SAaa4TGoCS w5bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=vZo7ET0lBcl98JX6n/hCp1L5/IwM2yp7Eu4Ugyh+OIo=; b=i1ksic4cSTf80wnTN0tLeCLRswQXl46m6ScMMNZ0l1+9VCy6aS10aL2RfvjDt8nXxH Yz+dqg0csI4ZAh+1XQTfcitRq1jWlmNXJRyxHObnXdN8NzjReq0k0xJUDpNCaYQvuUqS Kwj1bFaC4LoWUjrahmVTbiBCvxNCkhIASN6XOjFPn0p+3wsALLBjMKwNhzNiDm/on8/i 9UbsjZOr4untznJ37EfvbDWZCM8zHF/zHQFP+0Fi7eUe22+auHTn4e0oOD65//7X1jyU 9GT0bnJR7/KjaUjay2JUeX4DpZl8GjpdUCCcfOCkmEVFTLilL7HXsTE3qP3eW1DGzyK2 JbvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XN7s/G0w"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i66si632874pfb.91.2019.01.16.20.30.29; Wed, 16 Jan 2019 20:30:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XN7s/G0w"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728897AbfAQEa3 (ORCPT + 23 others); Wed, 16 Jan 2019 23:30:29 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35712 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728840AbfAQEaZ (ORCPT ); Wed, 16 Jan 2019 23:30:25 -0500 Received: by mail-pl1-f196.google.com with SMTP id p8so4118659plo.2 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=d5ToEe7nvQ2YVE4ub39wEpv0pDoW3w8AcgGuTzqk2twBXouEpHeqnUj1CDCXs4yPoL atf//ZFHt7fHgH61mlroXcx4akv/3Ta8IunmRFfR/PMjzp3oQmRMUr2vIIxCBMaUzdhJ uEK7FndGzJ6VUBmGWltyHAqomVLvKu8o9HjVzJqoAowCXdoa+Jy1M9EYTKSjM19lfDqH QVars3sW5mANzP9uGS/YhAHJd9KdklWOwatNkOiY3heoSke/pEu71Q6I24qu5+IcGDEI 53R6Yg0te0dagBJ8XzNbERtRmNRf8e6t6hlwahAR4cQSykFRlXs1E4XTGtoc105A4XIr hVkQ== X-Gm-Message-State: AJcUukc8+0RrFh8OgKIDZB/RjkqN3czX1NfkjLSvetkdDOYgUg2creP1 YvX108r9ExjSppTBrs6dxcy9Nw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(-) -- 2.18.0 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 {