Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp16796pxb; Tue, 12 Jan 2021 18:35:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJySzVtrviFjmlnl3RUElOl1pCZ1GqPDa3uqPH5P5i0Dww258mXoFgdtevOXiaPe6BNcUc1Y X-Received: by 2002:a17:906:af99:: with SMTP id mj25mr1287445ejb.414.1610505352787; Tue, 12 Jan 2021 18:35:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610505352; cv=none; d=google.com; s=arc-20160816; b=ShpdHAoWyRvutZl9UHzC0Y2gUQVnKw+SD6bxDc0qKfi5HeFld7IBhdIVlpCVG9uODh 21zEVh9zarkLGR+FmfNPqskhy6UM/wmYY5dEpRK9nKsMspJkP6pjFXglKg0z5VPEte2x xLBCNNrqhgp58ICEZZEf0FlMF0bs0ovU/jydHueBlWWNFiQenul0V8LustIgAETkiLZU ZDw22fw1UVidKTzfpHDDMBqdLASfPCo4LTWnR2O2fXBsHpB5CidnSXNvFyk39KR7tQXv wAngdxwNS8iSpDZdXZc5jyl4GXuKc0ynuaANKs0WDK20mMJ3oyiFXo3wNAOjz0xDyysa 8xwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AvHA4bOHZkqiiKl4HizzOBuEpDTkgtDpLwEY1T0BXGs=; b=NypeqOQOx9AaIoRuiNisATu9TW161SXmlrhzB7VYHGD5mRkWkEZzM9d/4LJrL1ensn u9u4h8BF+ln2hnPebRoK7gxohFFcvvKfMj2hXG3JDGDLiZ3XwXxCspeCCRKtxmxPRAOu mx/wz8fHYUp7AokUQgaNB2hwgXT4pPhz0BU/3+kRuZK//3CnDdESms3uQizlTLgRce6v j80Q+OwYClaQrFyTeaS+JYxJM+YVqxc5SgdpKr9xLnrpA/2GgfHJfZpVuyWUqnaG1YpD 1q7gcNbqOrEk8d6ZGzP3wQmAJ12ZslfuPIwB1luAJfciw3yBXb2bAPJ8oL/07U7W9y4f lIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=QsSskyDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si270888eds.556.2021.01.12.18.35.28; Tue, 12 Jan 2021 18:35:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=QsSskyDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437896AbhALVej (ORCPT + 99 others); Tue, 12 Jan 2021 16:34:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437089AbhALU6o (ORCPT ); Tue, 12 Jan 2021 15:58:44 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AC8DC061795 for ; Tue, 12 Jan 2021 12:58:04 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id c22so2241881pgg.13 for ; Tue, 12 Jan 2021 12:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=AvHA4bOHZkqiiKl4HizzOBuEpDTkgtDpLwEY1T0BXGs=; b=QsSskyDqNLtGtjG6ypv2SCMcRqq+N7k01J5CyU70eZzUBQfl+A/LxwyFZPTSYxwLvU X4PSVz5rw16UMr4+aowiuIrRG/bkbdxn0B6OXWmdoFWyLlJrw5Iy0d2dnAs6Z+ttEWap FFf5YmprnnV0EY/RqUTO8qp7jy+iTvpYTKvj0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=AvHA4bOHZkqiiKl4HizzOBuEpDTkgtDpLwEY1T0BXGs=; b=azE8rXSPyWL47qHSRf9T8uWB8npCFYsb0YY9msN+a9F9+JOKn9e3H0cQPPWOvSVzvP WfLB6JWCvjKWE78emRFfqpIU0jtfgF3xozrSuAPudTZA/mXmy04A/OZ8o5vnMMHCK3/Z 1II2eUPnT8zJPPTMUm+vtQpbM36WwjP6TzCh/JJNi+dPLoufukNfPv9dCp1hTlmHYp0N HNFyOh7MWkVI2uehKTUsz6TUUaLFEA3jeb4/LXB06rs0Ojs2MHuqYfY8uUzgv/PePNB1 EzgThnJpYHqCNCbZcDDenrBIS26rGZCNPkqosMfLsn0WkdWwt2PyVFVB2NCLueoScnQb zffg== X-Gm-Message-State: AOAM532dMoeFtEls1u96uQBC2r4uUXgpjhNyKgY4AcMJXF0v7fQ0uP2S 7K4Dt9UCnlOI+4nEfQbGZOKCcQ== X-Received: by 2002:a63:d041:: with SMTP id s1mr878448pgi.249.1610485083311; Tue, 12 Jan 2021 12:58:03 -0800 (PST) Received: from [10.136.8.219] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id q12sm4779590pgj.24.2021.01.12.12.58.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jan 2021 12:58:02 -0800 (PST) Subject: Re: [PATCH v2 1/2] arm64: dts: broadcom: clear the warnings caused by empty dma-ranges To: Arnd Bergmann Cc: Florian Fainelli , Bharat Gooty , devicetree , linux-kernel , Arnd Bergmann , Scott Branden , Ray Jui , linux-arm-msm , Andy Gross , Bjorn Andersson , Rob Herring , bcm-kernel-feedback-list , Zhen Lei , linux-arm-kernel References: <20201016090833.1892-1-thunder.leizhen@huawei.com> <20201016090833.1892-2-thunder.leizhen@huawei.com> <20201128045328.2411772-1-f.fainelli@gmail.com> <9c6c6b7e-8c39-8c49-5c87-9b560c027841@broadcom.com> <18112862-a42e-95b1-39a3-2e414667f39b@broadcom.com> From: Ray Jui Message-ID: <8aaa7bb9-a81e-cd0e-8e67-360515313748@broadcom.com> Date: Tue, 12 Jan 2021 12:57:59 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000567e8805b8ba472d" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000567e8805b8ba472d Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 1/12/2021 12:40 PM, Arnd Bergmann wrote: > On Tue, Jan 12, 2021 at 7:28 PM Ray Jui wrote: >> On 2020-12-15 7:49 a.m., Arnd Bergmann wrote: >>> On Tue, Dec 15, 2020 at 4:41 PM Florian Fainelli wrote: >>>> >>>> On 12/15/2020 5:19 AM, Bharat Gooty wrote: >>>>> Since the IOMMU is disabled and DMA engine is on 32-bit bus, We can not >>>>> give the complete DDR for the USB DMA. >>>>> So restricting the usable DAM size to 4GB. >>>> >>>> Thanks, can you make this a proper patch submission along with a Fixes: >>>> tag that is: >>>> >>>> Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by >>>> empty dma-ranges") >>> >>> Yes, that would be helpful, though I would appreciate a better description >>> that explains what is actually going on: is it the device or the bus that >>> has the 32-bit limitation, and if it is indeed a bug in the device, why do >>> you pretend that this is a 64-bit device on a 32-bit bus instead (this >>> could also use a comment in the dts file)? >>> >>> Arnd >>> >> >> Sorry for the delay in reply. Bharat finally got time to do some >> investigation to confirm the following: >> >> These USB controllers indeed can address 64-bit. However, on the bus >> internally, only 40-bits are connected to the interconnect of CCN. As a >> result, the 'dma-ranges' should be modified to address 40-bit in size. > > a 40-bit range is effectively the same as a 64-bit range though, so I > think you'll still need a driver quirk if the device cannot use the whole 40 > bit addressing but is limited to 32 bits because of a bug in its dma engine. > Bharat can correct me if I'm wrong, but I don't think we have a bug in the USB DMA engine that causes it can only address 32-bit. I believe we can set dma-ranges size to 40-bit here. The dma-range property is though required to be specified, instead of leaving it as empty, with the use of IOMMU. That seems to be a v5.10 specific behavior as I described below. Thanks, Ray >> We also have a somewhat related question, is it true that since v5.10, >> defining of 'dma-ranges' on the bus node where its child device node has >> implication of IOMMU usage (through 'iommus' or 'iommu-map') is now >> mandatory? My understanding is that the 'dma-ranges' in this scheme will >> define the IOVA address to system address mapping required by all >> devices on that bus. Please help to confirm if my understanding is correct > > I have not actually seen that change. In general, you should always > have a dma-ranges property in the parent of a DMA master, I think > we just never enforced that and fall back to a 32-bit mask by default. > > Arnd > --000000000000567e8805b8ba472d Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQMwYJKoZIhvcNAQcCoIIQJDCCECACAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2IMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcN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