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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 90607C4360C for ; Mon, 30 Sep 2019 08:20:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A899218DE for ; Mon, 30 Sep 2019 08:20:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AN6E2r5+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729964AbfI3IU5 (ORCPT ); Mon, 30 Sep 2019 04:20:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43008 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729923AbfI3IU5 (ORCPT ); Mon, 30 Sep 2019 04:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=If3yq1ODv3mmckOcV5bip4UCF3kVbPW2FQhUrotgaDI=; b=AN6E2r5+esnTrZkRBItKdRjse DHWl6KMtx8uvrMrd6Rm3NccrVdj8sgohG5IhvUu7yiSapvzR4zG/bp79mucxPjSJszkOKVpH8j+Tx 2LjUq3ltPhxUC0kfPwVvE/2+q38SwH4IotQGcGmUr4Up6EtdRTQiZ0wvN21iKY4deDJKGwH+Nv2Il 5HZKNU7KLYBypju4ygZ+GcaHczmiCKoY912aV98rRbc4Dnuh4t7KU3uSDZtsZ0InOTzuzjs+hLISZ 5jXl5ucrYxXR2QxMdaSLYGmnw9DWtFeZwFoRF8dgR6/P6gEdioEZk6JQsrYYRYqhTGEevN4Kgr3OW yvuEbI6JA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEqvP-000835-Nr; Mon, 30 Sep 2019 08:20:55 +0000 Date: Mon, 30 Sep 2019 01:20:55 -0700 From: Christoph Hellwig To: Arnd Bergmann Cc: Rob Herring , DTML , Linux ARM , "linux-kernel@vger.kernel.org" , linux-pci , Nicolas Saenz Julienne , Robin Murphy , Florian Fainelli , Stefan Wahren , Frank Rowand , Marek Vasut , Geert Uytterhoeven , Simon Horman , Lorenzo Pieralisi , Oza Pawandeep , Christoph Hellwig , Thierry Reding Subject: Re: [PATCH 00/11] of: dma-ranges fixes and improvements Message-ID: <20190930082055.GA21971@infradead.org> References: <20190927002455.13169-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sun, Sep 29, 2019 at 01:16:20PM +0200, Arnd Bergmann wrote: > On a semi-related note, Thierry asked about one aspect of the dma-ranges > property recently, which is the behavior of dma_set_mask() and related > functions when a driver sets a mask that is larger than the memory > area in the bus-ranges but smaller than the available physical RAM. > As I understood Thierry's problem and the current code, the generic > dma_set_mask() will either reject the new mask entirely or override > the mask set by of_dma_configure, but it fails to set a correct mask > within the limitations of the parent bus in this case. There days dma_set_mask will only reject a mask if it is too small to be supported by the hardware. Larger than required masks are now always accepted.