From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH URGENT] arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device() Date: Mon, 26 Jan 2015 11:42:29 +0100 Message-ID: <20150126104229.GB2312@suse.de> References: <1422022909-31044-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1422022909-31044-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@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: Laurent Pinchart Cc: Heiko Stuebner , arnd-r2nGTMty4D4@public.gmane.org, Will Deacon , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Thierry Reding , Alexandre Courbot , Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Fri, Jan 23, 2015 at 04:21:49PM +0200, Laurent Pinchart wrote: > Commit 4bb25789ed28228a ("arm: dma-mapping: plumb our iommu mapping ops > into arch_setup_dma_ops") moved the setting of the DMA operations from > arm_iommu_attach_device() to arch_setup_dma_ops() where the DMA > operations to be used are selected based on whether the device is > connected to an IOMMU. However, the IOMMU detection scheme requires the > IOMMU driver to be ported to the new IOMMU of_xlate API. As no driver > has been ported yet, this effectively breaks all IOMMU ARM users that > depend on the IOMMU being handled transparently by the DMA mapping API. > > Fix this by restoring the setting of DMA IOMMU ops in > arm_iommu_attach_device() and splitting the rest of the function into a > new internal __arm_iommu_attach_device() function, called by > arch_setup_dma_ops(). > > Signed-off-by: Laurent Pinchart > --- > arch/arm/mm/dma-mapping.c | 53 +++++++++++++++++++++++++++++++++-------------- > 1 file changed, 38 insertions(+), 15 deletions(-) I guess this patch will be merged by one of the ARM trees? Joerg