From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 00/11] of: dma-ranges fixes and improvements Date: Mon, 30 Sep 2019 01:20:55 -0700 Message-ID: <20190930082055.GA21971@infradead.org> References: <20190927002455.13169-1-robh@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: devicetree@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.