Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754588AbbK0Lt2 (ORCPT ); Fri, 27 Nov 2015 06:49:28 -0500 Received: from 8bytes.org ([81.169.241.247]:60380 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbbK0Lt0 (ORCPT ); Fri, 27 Nov 2015 06:49:26 -0500 Date: Fri, 27 Nov 2015 12:49:20 +0100 From: Joerg Roedel To: Chen Feng Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, devicetree@vger.kernel.org, puck.chen@aliyun.com, w.f@huawei.com, xuwei5@hisilicon.com, guodong.xu@linaro.org, arnd@linaro.org, haojian.zhuang@linaro.org Subject: Re: [PATCH V5 RESEND 0/3] Add iommu support for hi6220 HiKey board Message-ID: <20151127114920.GH24300@8bytes.org> References: <1447986309-47548-1-git-send-email-puck.chen@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447986309-47548-1-git-send-email-puck.chen@hisilicon.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 862 Lines: 21 On Fri, Nov 20, 2015 at 10:25:06AM +0800, Chen Feng wrote: > eg: > struct iommu_domain *domain = iommu_domain_alloc(bus); > iommu_attach_device(domain, dev); > struct iova_domain *iovad = (struct iova_domain *)m_dev->archdata.iommu; > struct iova * t_iova = alloc_iova(iovad, size, limit_pfn, align); > iommu_map(domain, t_iova->pfn_lo << 12, phy_addr, size, port); Any reason the media subsystem should use the iommu-api directly, and not the dma-api? You can make your iommu available by adapting the common dma-iommu implementation from Robin Murphy to your iommu to make it usable through the dma-api. Joerg -- 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/