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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 58D9CC433DF for ; Wed, 14 Oct 2020 14:04:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 ACF9A22201 for ; Wed, 14 Oct 2020 14:04:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WLwTdiDe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACF9A22201 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aq2uG/2jvoyGSULbMXdn3BfeHydHZW8mamG35AEM05A=; b=WLwTdiDe3/HNH1QcJqciqGPJ+ VTNyjkd3HGB5XuQbP8vJcPq0vSrj2sh80rte4q02sBOCRST8iE5JuyXEy8Gs0YKoCWZ6WUTSsW+1G xj2v0KdQBiFK+QGolj9mM+LZuo2b9hjo+GD8DHwWhriMO2Ln1hJwOk2OHn+A8igehtfzHD+NXk02+ znG/XVAcqScx2XUTviQXy/MPdujtXxRXrV/J/7xKNXUuIY2hUzEgPZve9NvZ7SSIzO7P/RIZiIKlY nEgu6zT9RtlqyjI+TumFBcgLpw1jjKoED1JAP8Pqm3hgGiMReOmz/jd9FCnjQ58OH9aPcus1j90ar z5sAsgbjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kShMa-0001Gv-0t; Wed, 14 Oct 2020 14:02:44 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kShMX-0001GF-Ih for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 14:02:42 +0000 Received: from mail-qv1-f52.google.com ([209.85.219.52]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MmyzH-1k0Xs01Lgl-00k4ww for ; Wed, 14 Oct 2020 16:02:39 +0200 Received: by mail-qv1-f52.google.com with SMTP id s17so1525836qvr.11 for ; Wed, 14 Oct 2020 07:02:39 -0700 (PDT) X-Gm-Message-State: AOAM531nUicI18VdXHpiBXq0kT5j4umV3ZVdF2sgSSNQumJIvZdDzodr O0L6UQ1O+qiIGZ9EJBE/g/bOiN88JFt4HHcBHck= X-Google-Smtp-Source: ABdhPJwgfI56FrNLiz4CpSplDkSHoEZ4Zvt+zTgBjQFaC37WzSoizPQNv2FK+09dOqqroEW1nEyt+Y67obGqrjFMkVY= X-Received: by 2002:a0c:9b9e:: with SMTP id o30mr5218986qve.16.1602684158004; Wed, 14 Oct 2020 07:02:38 -0700 (PDT) MIME-Version: 1.0 References: <20201013060623.1711-1-thunder.leizhen@huawei.com> <20201013060623.1711-2-thunder.leizhen@huawei.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 14 Oct 2020 16:02:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] arm64: dts: broadcom: remove an unused property dma-ranges To: "Leizhen (ThunderTown)" X-Provags-ID: V03:K1:D+haCW1IUjPXa+GLd6SlspbQ9/NqEKRtDIahvp4cIasnySraLR9 6+oMk4clY+4cmGHFMGU8W2fvKBqs31IZf0e7w4yaAb/HZWylkodTU/gvDwlNpR74FR0/Va6 CBA8klFN4f4xYzJW6grw7XvR7LDa8+bPwMssipn21tMHbDiHEXsVUMkx9a2bFcthraMzywI rr5IRanqLiW8gpctXg9DQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:nfdREPb0aLc=:PrSECk6iGgvQ0LnUNqOCnw mWcr6+niahbXZ5xScMwB5zgNXpL5DwnJu5+yMuERZeToMamCceBNUpMMvU+92WtMPM4shWiY5 bohMOLMfXmla1TM4kwFeRrvsvQX8uyPTiZo/wp3WrjirzdS12wh6Hq73yhmGdPC0ZJXjD0AMx Yzm/T7loCft2/q5SpnPt+eOXgW7lciD4doibANVjHgSrU9EzzfTG+9PyK5uqwfB8LxDARbemK siCu/5wHpyPQGAJgWqHuj/6PZUEpmhzXTOuPlsWJ9R5ee0zPRg0BUbdTwsBnmanXDQyqXC0y6 3CiaZjb1tkxIQVofQit27bZTCBKWZeAYkb9TGjolHqTS0Y/SQnqMX/SLCKHRqrt8nEoaLSe0Y gjXqtG+9w+tKsy6j+lLtZMx9wj1aqpFfx94UF8bChZinaJpBLUqHU3bg5bCe/NwbGp41m82DJ TTwqSEkPuWnZS+jJVb+RG2XtJs2U31LiLDqBkVYjacRJdP9Oby7jdM1XAt4wC3+Did9mSUAly DqX1ZwndJ7UPYGTD0AT6meK8ZJAj6N4rqKKO4t5CrmJ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_100241_851975_87B599CA X-CRM114-Status: GOOD ( 29.88 ) 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 , Florian Fainelli , Scott Branden , Ray Jui , linux-kernel , Rob Herring , Bjorn Andersson , Andy Gross , bcm-kernel-feedback-list , linux-arm-msm , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 14, 2020 at 3:36 PM Leizhen (ThunderTown) wrote: > On 2020/10/14 15:38, Arnd Bergmann wrote: > > On Wed, Oct 14, 2020 at 5:15 AM Florian Fainelli wrote: > >> On 10/12/2020 11:06 PM, Zhen Lei wrote: > >>> stingray-usb.dtsi is finally included by three dts files: > >>> bcm958802a802x.dts, bcm958742k.dts and bcm958742t.dts. I searched all > >>> these three entire expanded dts files, and each of them contains only one > >>> dma-ranges. No conversion range is specified, so it cannot work properly. > >>> I think this property "dma-ranges" is added by mistake, just remove it. > >>> Otherwise, the following error will be reported when any YAML detection > >>> is performed on arm64. > >>> > >>> arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ > >>> (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ > >>> its #address-cells (1) differs from / (2) > >>> arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ > >>> (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ > >>> its #size-cells (1) differs from / (2) > >>> > >>> Signed-off-by: Zhen Lei > >> > >> This looks fine to me, Scott, Ray do you want to Ack this patch before I > >> take it? > > > > Does it mean that there are no devices on this bus that can do DMA? > > > > Usually there should be a dma-ranges property to identify that DMA > > is possible and what the limits are, though we have failed to enforce > > that. > > Documentation/devicetree/bindings/iommu/iommu.txt +79 > When an "iommus" property is specified in a device tree node, the IOMMU will > be used for address translation. If a "dma-ranges" property exists in the > device's parent node it will be ignored. An exception to this rule is if the > referenced IOMMU is disabled, in which case the "dma-ranges" property of the > parent shall take effect. > > The dma-ranges is only required by IOMMU disabled case. And should exist in > the parent node of IOMMU device. But this deleted dma-ranges is under the usb > bus node. The USB hosts here don't use an IOMMU though, right? > > Also note that the #address-cells=<1> means that any device under > > this bus is assumed to only support 32-bit addressing, and DMA will > > have to go through a slow swiotlb in the absence of an IOMMU. > > The dma_alloc_coherent() will allocate memory with GFP_DMA32 flag and > try the 0-4G first. The reserved swiotlb buffer memory is used only > when the allocation failed. The swiotlb is primarily about the streaming mappings with dma_map_*(), which has to copy all data sent to the device. dma_alloc_coherent() is a rare operation and less impacted by DMA limitations. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel