From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: IOMMU DMA-mapping API for arm64 ? Date: Tue, 29 Apr 2014 13:52:59 +0100 Message-ID: <20140429125259.GA27770@arm.com> References: <201402272006.51057.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: Ritesh Harjani Cc: Catalin Marinas , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Arnd Bergmann List-Id: iommu@lists.linux-foundation.org On Sat, Apr 26, 2014 at 03:28:37PM +0100, Ritesh Harjani wrote: > Hi Guys, > > Need again some help in deciding which all functions/Data structures > needs to be moved out from arch/arm/mm/dma-mapping to > lib/iommu-helper.c. > > 1. There is this dma_iommu_mapping structure defination in > arch/arm/include/asm/dma-iommu.h. In arm this structure is declared as > "mapping" which is part of dev_archdata structure, which is used for > IOVA management. > Now, does this make sense to move this structure out to > include/linux/iommu-helper.h ? And define a config like > CONFIG_IOMMU_USE_HELPER_MAPPING (default n) which will be used to, > have a variable("mapping") defined or not in dev_archdata of all > archs. In that case, wouldn't it make more sense to put the DMA mapping information in the struct device itself, rather than the dev_archdata? The CMA data, for example, is stored directly there. Will