From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933653AbdAJO7T (ORCPT ); Tue, 10 Jan 2017 09:59:19 -0500 Received: from verein.lst.de ([213.95.11.211]:55704 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761507AbdAJO7Q (ORCPT ); Tue, 10 Jan 2017 09:59:16 -0500 Date: Tue, 10 Jan 2017 15:59:14 +0100 From: Christoph Hellwig To: Arnd Bergmann Cc: Robin Murphy , Nikita Yushchenko , Will Deacon , linux-arm-kernel@lists.infradead.org, Catalin Marinas , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Simon Horman , Bjorn Helgaas , artemi.ivanov@cogentembedded.com, fkan@apm.com, Christoph Hellwig Subject: Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle Message-ID: <20170110145914.GE27156@lst.de> References: <1483947002-16410-1-git-send-email-nikita.yoush@cogentembedded.com> <07253eaa-5729-0f15-42b6-e8403f1f0412@cogentembedded.com> <11daacde-5399-039f-80a3-01d7bd13e9e8@arm.com> <6116278.nQQUSuo3l4@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6116278.nQQUSuo3l4@wuerfel> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 10, 2017 at 02:42:23PM +0100, Arnd Bergmann wrote: > It's a much rarer problem for the IOMMU case though, because it only > impacts devices that are restricted to addressing of less than 32-bits. > > If you have an IOMMU enabled, the dma-mapping interface does not care > if the device can do wider than 32 bit addressing, as it will never > hand out IOVAs above 0xffffffff. That's absolutely not the case. IOMMUs can and do generate addresses larger than 32-bit. Also various platforms have modes where an IOMMU can be used when <= 32-bit addresses are used and bypassed if full 64-bit addressing is supported and I/O isolation is not explicitly requested.