Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753386Ab2K2Gps (ORCPT ); Thu, 29 Nov 2012 01:45:48 -0500 Received: from hqemgate03.nvidia.com ([216.228.121.140]:6713 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645Ab2K2Gpq (ORCPT ); Thu, 29 Nov 2012 01:45:46 -0500 X-PGP-Universal: processed; by hqnvupgp06.nvidia.com on Wed, 28 Nov 2012 22:45:09 -0800 Date: Thu, 29 Nov 2012 08:45:15 +0200 From: Hiroshi Doyu To: Stephen Warren CC: "m.szyprowski@samsung.com" , "joro@8bytes.org" , "James.Bottomley@HansenPartnership.com" , "arnd@arndb.de" , Krishna Reddy , "linux@arm.linux.org.uk" , "minchan@kernel.org" , "chunsang.jeong@linaro.org" , "linux-kernel@vger.kernel.org" , "subashrp@gmail.com" , "linaro-mm-sig@lists.linaro.org" , "linux-mm@kvack.org" , "iommu@lists.linux-foundation.org" , "linux-tegra@vger.kernel.org" , "kyungmin.park@samsung.com" , "pullip.cho@samsung.com" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 1/1] ARM: tegra: bus_notifier registers IOMMU devices(was: How to specify IOMMU'able devices in DT) Message-ID: <20121129084515.8a818bf4793e0d4bb3305c36@nvidia.com> In-Reply-To: <50B652F2.5050407@wwwdotorg.org> References: <20120924124452.41070ed2ee9944d930cffffc@nvidia.com> <054901cd9a45$db1a7ea0$914f7be0$%szyprowski@samsung.com> <20120924.145014.1452596970914043018.hdoyu@nvidia.com> <20121128.154832.539666140149950229.hdoyu@nvidia.com> <50B652F2.5050407@wwwdotorg.org> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1812 Lines: 44 On Wed, 28 Nov 2012 19:07:46 +0100 Stephen Warren wrote: ...... > >>> Please read more about bus notifiers. IMHO a good example is provided in > >>> the following thread: > >>> http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12238.html > >> > >> This bus notifier seems enough flexible to afford the variation of > >> IOMMU map info, like Tegra ASID, which could be platform-specific, and > >> the other could be common too. There's already iommu_bus_notifier > >> too. I'll try to implement something base on this. > > > > Experimentally implemented as below. With the followig patch, each > > device could specify its own map in DT, and automatically the device > > would be attached to the map. > > > > There is a case that some devices share a map. This patch doesn't > > suppor such case yet. > > > > From 8cb75bb6f3a8535a077e0e85265f87c1f1289bfd Mon Sep 17 00:00:00 2001 > > From: Hiroshi Doyu > > Date: Wed, 28 Nov 2012 14:47:04 +0200 > > Subject: [PATCH 1/1] ARM: tegra: bus_notifier registers IOMMU devices > > > > platform_bus notifier registers IOMMU devices if dma-window is > > specified. > > > > Its format is: > > dma-window = <"start" "size">; > > ex) > > dma-window = <0x12345000 0x8000>; > > > > Signed-off-by: Hiroshi Doyu > > --- > > arch/arm/mach-tegra/board-dt-tegra30.c | 40 ++++++++++++++++++++++++++++++++ > > Shouldn't this patch be to the IOMMU driver itself, not the core Tegra code? That could be possible and cleaner. I'll check if it works. -- 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/