Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752999AbbBYQKz (ORCPT ); Wed, 25 Feb 2015 11:10:55 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:52338 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199AbbBYQKw (ORCPT ); Wed, 25 Feb 2015 11:10:52 -0500 From: Arnd Bergmann To: Murali Karicheri Cc: Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Joerg Roedel , Grant Likely , Rob Herring , Will Deacon , Russell King , Suravee Suthikulpanit Subject: Re: [PATCH v6 6/7] PCI: update dma configuration from DT Date: Wed, 25 Feb 2015 17:09:41 +0100 Message-ID: <4781283.CC9oFpsHLJ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <54EDF236.40101@ti.com> References: <1423173179-10227-1-git-send-email-m-karicheri2@ti.com> <20150225015317.GO6220@google.com> <54EDF236.40101@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:mZEc21B1eA/ULdGXIhP03bmkGuJbkeGNha6LmGC+RQ+1Yu1oadL 0ZN7isre0ilws5OihnwiilEpxJcrZn+tlPFDR4aATQ9bOx9YKV70bpoAGGLNjAGTwrPBgGU F4eS4YsNkeagr77OEQQLZ2Sv4SlfXDebaeZWcbl9VBVaOFfCH9p2R3Gy0Uy9siKuuaI0uFk 5zSUekVn91gfgqkgfIvEA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1889 Lines: 36 On Wednesday 25 February 2015 11:03:02 Murali Karicheri wrote: > > > (I don't know exactly how these patches all fit together, so that's > > probably not accurate, but that's the *sort* of thing I'd like to include.) > > > > If that actually *is* what's going on, I have to wonder why this isn't > > implemented as a very simple IOMMU instead of adding dma_pfn_offset, > > which is present on all arches but only used on ARM. In some sense that > > offset is parallel but incompatible with an IOMMU: they both translate DMA > > addresses into system RAM addresses. > > I don't have much history on any previous discussion on the subject you > are referring to. I assume it would have happened when > of_dma_configure() was first introduced. On Keystone, we don't have > IOMMU support and dma_pfn_offset is needed to translate DMA address to > System RAM address and vice-versa. So this has to be supported for > Keystone. There can be enhancement for IOMMU with out impacting this > feature for Keystone. The direction we are taking with IOMMU in general is opposite to what Bjorn is suggesting: I believe what he wants to say is that we should use the traditional approach of having a specialized dma_map_ops implementation for this, just like we do for IOMMU implementations on x86, IA64 or PowerPC. However, with the recent explosion of IOMMU implementations on ARM, we are moving towards having a single dma_map_ops structure for all of them, and that structure does not work with the keystone hardware. Instead, the normal ARM dma_map_ops have been changed to handle the offset, which is the same thing we do on PowerPC. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/