From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [RFC 0/3] How to pass IOMMU map attr via DMA API? Date: Mon, 24 Jun 2013 09:21:28 +0200 Message-ID: <20130624072128.GP11309@8bytes.org> References: <1371707384-30037-1-git-send-email-hdoyu@nvidia.com> <51C3FE27.5070702@samsung.com> <20130621160344.GM11309@8bytes.org> <20130624081759.76e66d42bbf7c2c54ed1975c@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130624081759.76e66d42bbf7c2c54ed1975c-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Hiroshi Doyu Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: linux-tegra@vger.kernel.org On Mon, Jun 24, 2013 at 08:17:59AM +0300, Hiroshi Doyu wrote: > Ok, thanks. One more question, IOMMU H/W sometimes supports more > platform specific attributes than READ/WRITE. For example, in OMAP, > > #define IOMMU_FLAG (IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8) > > Is there any way to deal with those platform specific attrs from DMA > mapping API POV? Depends on the kind of flag and whether you want to make it changeable from the DMA-API. The AMD IOMMU for example has a flag in the page-tables to force PCI DMA coherency. This is always set by the driver. For other parameters that should be changeable and don't fit into the dma_direction parameter in some way the use of dma_attr would make sense. Joerg